Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Get status of undefined property

2 replies to this topic


  • Full Members
  • 77 posts

Posted 07 November 2016 - 23:14


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.



  • Full Members
  • 1 posts

Posted 08 November 2016 - 06:06

We can search a registry using below install script,


    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. */




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.

Stefan Krueger

Stefan Krueger


  • Administrators
  • 13,269 posts

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.