Search code examples
wixwindows-installerregistryinstallshield

adding install location in installdir to Registry key in installshield 2018


I do not know how I can put the user-selected installation path in the registry key in the Installshield environment. Please guide me step by step. Thanks


Solution

  • Essence: Essentially storing property values in the registry entails explicitly defining them to be written into a known registry location (I use per-machine, in other words HKLM, to ensure the property can be read back by all users on the machine) and then you use AppSearch (built-in MSI mechanism) or a custom action to read back the values as appropriate.

    HKLM\Software\[Manufacturer]\[ProductName]\[ProductVersion] = [PROPERTYNAME]
    

    How-To: Rather than me repeating the steps here, please read the following documents:

    Complexity: The latter link is not for Installshield, but for WiX. It shows the same save property procedure in WiX, but more importantly it discusses how reading properties back from the registry can conflict with properties set on the command line.