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
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Set Registry through Prerequisite?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 07, 2010
04:41 PM
Set Registry through Prerequisite?
Hi,
I was wondering if there is a way to set registry values through the prerequisite Component Wizard. i am building a MSI install, and i am needing to change the registry values before all of the Prerequisites install, and i am not seeing a way to do this through the custom actions. It seems that the custom actions essentially begin executing AFTER the prerequisites are done. (if i am wrong, please let me know where i should be putting my custom action in order for it to execute before the prerequisites are done).
Please let me know if there is a way to make a prerequisite set registry values... im not sure how else to do this since they must be set essentially when the install starts... thanks!
I was wondering if there is a way to set registry values through the prerequisite Component Wizard. i am building a MSI install, and i am needing to change the registry values before all of the Prerequisites install, and i am not seeing a way to do this through the custom actions. It seems that the custom actions essentially begin executing AFTER the prerequisites are done. (if i am wrong, please let me know where i should be putting my custom action in order for it to execute before the prerequisites are done).
Please let me know if there is a way to make a prerequisite set registry values... im not sure how else to do this since they must be set essentially when the install starts... thanks!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 07, 2010
05:22 PM
Right, setup prerequisites are launched before the main installation begins (and hence before any custom actions are launched). Feature prerequisites are launched if/when the features that contain the prerequisites are installed. For more info about the differences between these two types of InstallShield prerequisites, see Setup Prerequisites vs. Feature Prerequisites
Can you create a simple installation that makes the required registry changes, create an InstallShield prerequisite for that installation, and then add it to your project as the first prerequisite to be run?
Can you create a simple installation that makes the required registry changes, create an InstallShield prerequisite for that installation, and then add it to your project as the first prerequisite to be run?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2010
01:39 PM
I was able to make a .reg file and was able to change the registry by making that a prerequisite. So that part is done. thanks for clarifying alot of things!
So now i am working on some finishing touches..
I am getting some warnings from the custom actions i created. The warnings are "The Custom Action in the InstallExecuteSequence table is run from an installed file. To run the custom action successfully, you may need to have a condition that checks if the source file is installed locally."
So the custom actions work fine, and i do see where i could be setting a condition in the Custom action under "Install Exec Condition", i just have never quite gotten the hang of conditions, though i have tried many times.
what would be the syntax to check if the file has already been installed? and to run the custom action if it has been installed?
thanks for all the help!
So now i am working on some finishing touches..
I am getting some warnings from the custom actions i created. The warnings are "The Custom Action in the InstallExecuteSequence table is run from an installed file. To run the custom action successfully, you may need to have a condition that checks if the source file is installed locally."
So the custom actions work fine, and i do see where i could be setting a condition in the Custom action under "Install Exec Condition", i just have never quite gotten the hang of conditions, though i have tried many times.
what would be the syntax to check if the file has already been installed? and to run the custom action if it has been installed?
thanks for all the help!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2010
03:02 PM
If you are sure that the action will be run only when the file is present, you can ignore the warning. If it is possible that the action may be launched when the file is not present (for example, if the file is in a feature that end users can choose to not install), you'll want to add some sort of condition to the custom action.
You may want to add a condition that checks the action of the feature or the component that contains the file. Thus, if you want the action to run only when feature has been installed (and not during uninstallation for example), try a custom action condition such as this:
&MyFeature=3
or
&MyFeature>=3
(depending on whether the feature can be installed locally or allowed to be run from source)
You'll want to test your installation and uninstallation with the custom action condition and make sure it behaves as needed.
Here are a few links with more info:
http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa368561(VS.85).aspx
I hope that helps.
You may want to add a condition that checks the action of the feature or the component that contains the file. Thus, if you want the action to run only when feature has been installed (and not during uninstallation for example), try a custom action condition such as this:
&MyFeature=3
or
&MyFeature>=3
(depending on whether the feature can be installed locally or allowed to be run from source)
You'll want to test your installation and uninstallation with the custom action condition and make sure it behaves as needed.
Here are a few links with more info:
http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa368561(VS.85).aspx
I hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2010
12:31 PM
thank you.. i finally got a condition to work properly.. what a relief.. even though i was not getting errors on the install (only warnings) because i was not setting a condition for the custom action i was unable to uninstall it! So i was able to set a condition that only executed the custom actions to install if the components were scheduled to install:
$componentName.exe=3
thanks again for all the help! On my way to finally getting my first MSI install complete!
$componentName.exe=3
thanks again for all the help! On my way to finally getting my first MSI install complete!