Summary
This knowledge base article addresses how to read information from the registry and use it to determine if the installation should continue.Synopsis
This knowledge base article addresses how to read information from the registry and use it to determine if the installation should continue.
Discussion
The System Search Wizard is now available in InstallShield to step you through the process of creating and configuring install conditions (...read from registry or other sources) quickly and easily. This is accessible via the System Search view from within the InstallShield IDE.
Workaround
In the AppSearch table, add an entry for the following columns:
| Column | Description |
|---|---|
| Property | The property that is set to the value read from the Registry. |
| Signature_ | Unique signature for which to search. In this case, it is used as the signature identifier. |
For example:
| Property | LAUNCHCONDITIONDATA |
| Signature_ | REGKEYSIGNATURE |
In the RegLocator table, add an entry for the following columns:
| Column | Description |
|---|---|
| Signature_ | Signature key defined in the AppSearch table |
| Root | Number defining the root in which to search. Please refer to the table in the Additional Information section of this article for more information. |
| Key | The key in which you would like to search |
| Name | The value you would like to query. If this field is left null, this will query Default |
| Type | The type of data you are querying. For more information, refer to the table in the Additional Information section of this article |
For Example:
| Signature_ | REGKEYSIGNATURE |
| Root | 2 |
| Key | Software\CompanyName |
| Name | ProductInstalled |
| Type | 2 |
The next step is to define your sequences. By default, the action that evaluates your Install Condition activates first, followed by the AppSearch action that queries the registry value. Therefore, it is necessary to place the AppSearch action right before the LaunchConditions action in both the Installation User Interface and Installation Execute sequences.
Be aware that the AppSearch action in each sequence has a condition of APPS_TEST on it. It is advisable to remove this condition, otherwise the AppSearch action will not execute.
It is now possible to query the property LAUNCHCONDITIONDATA, which was defined in the AppSearch table from the install condition. Depending on what value was read out of the registry, the Install condition might look something like:
LAUNCHCONDITIONDATA = "ProductInstalled"
It is also important to note that the property LAUNCHCONDITIONDATA does not exist by default. When AppSearch finds the registry key, it will generate and populate this property for you. Therefore, if the existence of the registry value is most important, you can use a launch condition to test for the existence of the LAUNCHCONDITIONDATA property. Your Install Condition would look like the example below:
LAUNCHCONDITIONDATA
Additional Information
If the key is found by RegLocator, the Property specified in AppSearch will be assigned the registry value.
Possible values for the Root column:
Root Value HKEY_CLASSES_ROOT 0 HKEY_CURRENT_USER 1 HKEY_LOCAL_MACHINE 2 HKEY_USERS 3 Possible values for the Type column:
Description Value Search for a directory 0 Search for a filename 1 Search for raw registry data 2
For more information on the tables discussed, see the Windows Installer Help Library topic AppSearch Table and RegLocator Table.
For more information on using the System Search view, see the InstallShield Help Library topic System Search Wizard.
Related Articles
Create an Install Condition Based on Registry Entry using Installshield 3Number of Views Configure a Custom Install Condition Based on the Target Operating System 3Number of Views Create Condition based on Feature being Installed 4Number of Views Create a Component Condition Based on a Feature Being Installed or Not 4Number of Views Specifying a Condition Based on a Checkbox Value 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago