Hello,
First of all we apologize for such a delayed answer. In order to achieve what you want you should use a bit more tricky workaround.
Here's how Windows Installer works: during installation if a component condition is TRUE, then its state will be set to install and the state will be also preserved during later reinstall operations (e.g. during maintenance mode). Therefore if at first install time your registry component condition is evaluated to TRUE, then during the subsequent repair operations the registry component will always be repaired (even if on maintenance the component condition is evaluated to FALSE). In order to avoid this behavior you should set the
"Transitive" flag for your registry component. In this way the component condition will be reevaluated during reinstall mode too.
However, please note that if the component condition will be reevaluated to FALSE during reinstall, then the component will be uninstalled (and the registry value will be removed). Therefore, you need to use another transitive component which will install the registry value only when the related registry already exists and your property is set to its default value (i.e. "*").
Here's a step by step approach:
1. open your merge module .aip and go to "Module Details" page
2. in the "Properties" section add the following property:
3. go to "Search" page and add a new search (REG_SEARCH)
4. from its context menu choose "Add Location -> Registry" and configure the registry search like this:
- Root: HKEY_LOCAL_MACHINE
Key: Software\DDi
Name: TestKey
Type: Retrieve the raw value
5. go to "Registry" page and under "Software" add a new key with the following name:
[REG_KEY]
6. under
[REG_KEY] key add a new registry value like this:
- Name: TestKey
Data: [REG_SEARCH]
7. select the added registry value and from its context menu use "Go to Component" option
8. in the "Condition" field of the selected component use the following expression:
9. check the "Transitive" flag for the above component and for the component of the second TestKey registry value
10. rebuild your projects and test the scenario again
Also, I've attached a sample created with AI 11.6.3 version which implements a similar behavior.
Let us know if this helped.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging