Check if a registry key exists¶
Lets you check whether a registry key (and not an entry: see below) exists or not. You can for example see whether an application is available.
|Property Name||Data Type||Description|
|Key||String||The key name in the registry to be checked. Like "SOFTWARE\My App"|
|ReturnVariable||VarName||The name of the variable whose value will be set to the result. If the registry key exists, it is set to "1". Otherwise it is set to "0" (Boolean type)|
|RootKey||hkKeys||The base key of your registration key. There is a defined set of Base Keys from which you can choose (in the list box).|
Note: this option only checks for registry keys and not entries. If you need to check for an entry, then use a "Read from registry" custom action and enter a default value (for example "0" or "-1", something you are sure the registry entry should never be set to). If the package is unable to find the registry entry, it will return the default value, and with a conditional if/then action, you should be able to determine whether the registry entry exists or not.