Hi,
I am trying to retrieved values stored in below registry key by system search. I am successful when this registry key is set to some value.
HKEY_LOCAL_MACHINE --- SOFTWARE\Microsoft\Microsoft SQL Server\Sevices\SQL Server --- Name
But I don't get anything when this registry key does not exists on destination computer.
Is there any way to check whether this key exists on target machine and be assigned to some property which i can use further to install a feature ?
Install shield documentation says following :
Windows Installer does not have built-in support for searching target systems for the presence or absence of a specific registry key. However, you can create a system search that looks for the default value of a specific registry key. If the default value is present, Windows Installer writes it to the system search’s associated property. If the system search fails to find the default value, Windows Installer leaves the property undefined.
In this case is there any way to detect undefined property ?
Thanks in advance.
Amarjeet

Get status of undefined property
Posted 07 November 2016 - 23:14
Posted 08 November 2016 - 06:06
We can search a registry using below install script,
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
szkey=\\Software\\..............;
szVersionString="";
RegDBGetKeyValueEx( szkey,"RegistryKey",nvType , szVersionString, nSize );
/* Assign a value to IFX_INSTALLED_VERSION. */
// MessageBox("Installed version="+szVersionString,INFORMATION);
switch (szVersionString)
/* A registered version string of "A" corresponds to an existing version number of 1.0.0. */
case "key value":
fileversion= " ";
// MessageBox("......................",INFORMATION);
/* A registered version string of "B" corresponds to an existing version number of 1.1.0. */
default:
MessageBox("...........................................",SEVERE);
exit;
endswitch;
***********************************************************************************
If you have any queries, please do a mail to this mail id perumal9791@gmail.com .
Edited by perumal9791@gmail.com, 08 November 2016 - 06:07.
Posted 08 November 2016 - 18:21
Undefined is like empty string. So you cannot distinguish a value with an empty string from a non existing property.
Stefan Krüger
InstallSite.org twitter facebook