This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Applying Rule
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎May 11, 2011
01:33 AM
Applying Rule
Hi,
I am creating a project for windows. I want to enable/disable a feature based on the registry key. If the key is present the feature should get enabled and if the key is not there the feature should get disabled. Can anyone please suggest a solution...
I am creating a project for windows. I want to enable/disable a feature based on the registry key. If the key is present the feature should get enabled and if the key is not there the feature should get disabled. Can anyone please suggest a solution...
(9) Replies
‎May 11, 2011
04:24 AM
Are you talking about windows registry key or InstallAnywhere registry ?
Anyway, you have the following actions available in pre-install at least:
- "Get windows registry entry" for windows registry
or
- "Find component in registry" for installanywhere.
Based on the result variable, then you can enable/disable the feature by associating a rule in the "Organization/feature of the feature to enable/disable.
--Jerome
Anyway, you have the following actions available in pre-install at least:
- "Get windows registry entry" for windows registry
or
- "Find component in registry" for installanywhere.
Based on the result variable, then you can enable/disable the feature by associating a rule in the "Organization/feature of the feature to enable/disable.
--Jerome
‎May 12, 2011
01:19 AM
Thanks Jerome for your answer. Actually I was using ISMP 5.x in my company. There we were using the condition "Windows Registry Value Exists Wizard Bean Condition" to detect whether a particular registry key exists or not. If the key exist we simply cancel the installation. Now I have to provide the same functionality in IA 10.
‎May 12, 2011
01:46 AM
Then you need to cancel the installation, not enable/disable a feature ? It's not that clear but the implementation is almost the same ...
Use "Get windows registry entry" action at the beginning of Pre-install, then use the variable that "Store Key Existence" and use this variable in a rule of another action that cancel the installation when key exists (e.g. Show Message Dialog).
--
Use "Get windows registry entry" action at the beginning of Pre-install, then use the variable that "Store Key Existence" and use this variable in a rule of another action that cancel the installation when key exists (e.g. Show Message Dialog).
--
‎May 12, 2011
03:24 AM
Got it. Thanks alot Jerome for your help.
‎May 13, 2011
06:54 AM
Hi Jerome,
When the value(string) exists under the key the Get Registry Value action returns its value and I can compare this value against some string and everything is fine. But when the value is not present the action returns an empty string by default and when I campore this against the variable $EMPTY_STRING$ it creates problems. Do you have any idea about this?? I think it should work in both cases.
thanks.:confused:
When the value(string) exists under the key the Get Registry Value action returns its value and I can compare this value against some string and everything is fine. But when the value is not present the action returns an empty string by default and when I campore this against the variable $EMPTY_STRING$ it creates problems. Do you have any idea about this?? I think it should work in both cases.
thanks.:confused:
‎May 16, 2011
12:20 AM
The actual problem is that I am unable to check whether a particular registry value exists under some key or not (value not the key itself). If you have some idea, it will solve my problem.
Thanks
Thanks
‎May 16, 2011
02:10 AM
Maybe $EMPTY_STRING$ comparison does not work because it is not null.
Try to compare the "Store Value in Variable" another way:
e.g. "x$YOUR_VALUE_IN_VAR$" equals "x"
Otherwise try debugging it by displaying "output debug information" with InstallAnywhere variable action at this step.
--Jerome
Try to compare the "Store Value in Variable" another way:
e.g. "x$YOUR_VALUE_IN_VAR$" equals "x"
Otherwise try debugging it by displaying "output debug information" with InstallAnywhere variable action at this step.
--Jerome
‎May 16, 2011
04:16 AM
i have done it using batch file. I sored the exit code in a variable the used this value in the "Compare InstallAnywhere Variables" rule. Anyways thanks alot Jerome.