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: Two things for a n00b
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
‎Nov 05, 2007
02:37 PM
Two things for a n00b
I'm working on a Basic MSI using InstallShield 2008 Pro.
Two things that I have left to do with this is package is:
1) On installation, if a specific registry key exists, I want the package to abort with a message stating "Program A seems to be installed, please remove Program A first before installing this package."
2) On removal, AND ONLY REMOVAL, if a specific registry key or file exists, I want the package to abort with a message stating, "Program B is installed. Remove Program B first before removing this package."
I've used a launch condition to search for a specific registry key, but I can only get the package to abort only if the registry key doesn't exist.
How do I get to do it the other way and have it just look on a removal?
Thanks in advance,
js.
Two things that I have left to do with this is package is:
1) On installation, if a specific registry key exists, I want the package to abort with a message stating "Program A seems to be installed, please remove Program A first before installing this package."
2) On removal, AND ONLY REMOVAL, if a specific registry key or file exists, I want the package to abort with a message stating, "Program B is installed. Remove Program B first before removing this package."
I've used a launch condition to search for a specific registry key, but I can only get the package to abort only if the registry key doesn't exist.
How do I get to do it the other way and have it just look on a removal?
Thanks in advance,
js.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 05, 2007
05:10 PM
1) On installation, if a specific registry key exists, I want the package to abort with a message stating "Program A seems to be installed, please remove Program A first before installing this package."
Use a system search to store a value under that particular key to a property. Let's say the property is called PROGA_INSTALLED. In a launch condition, use the condition
PROGA_INSTALLED=""
and set the message for when this is false. (ie: when the reg entry exists)2) On removal, AND ONLY REMOVAL, if a specific registry key or file exists, I want the package to abort with a message stating, "Program B is installed. Remove Program B first before removing this package."
Use a system search to store a value under this key to a property...lets say PROGB_INSTALLED. Create an Error (type 19) CA. Schedule it after LaunchConditions in both the UI and EXE sequences, but schedule it to only run once. Set the condition to PROGB_INSTALLED and assign it an appropriate message.
Enjoy!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2007
11:23 AM
Kelter wrote:
Use a system search to store a value under this key to a property...lets say PROGB_INSTALLED. Create an Error (type 19) CA. Schedule it after LaunchConditions in both the UI and EXE sequences, but schedule it to only run once. Set the condition to PROGB_INSTALLED and assign it an appropriate message.
Enjoy!
I followed (at least I think I did :confused:) your steps above. I could never get it to do what I wanted it to do (check for a registry key only on uninstall and abort if registry key exists). It just seems to ignore it altogether.
I set up the System Search using a registry key path with PROGB_INSTALLED as the property.
This is what I have set up for the CA Type 19 Error:
Error Message: Blah blah blah
Return Processing: Synchronous (Check exit code)
In-Script Execution: Immediate Execution
Execution Scheduling: Execute only once
Install UI Sequence: After LaunchConditions
Install UI Condition: PROGB_INSTALLED
Install Exec Sequence: After LaunchConditions
Install Exec Condition: PROGB_INSTALLED
Did I miss something? Remember, I'm a total n00b to all this.
Thanks for your help!
js.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2007
11:56 AM
The system search shouldn't be only running on uninstall...i'm not quite sure how you'd do that, actually... Perhaps I should have said that the condition on the type 19 CA should have been
PROGB_INSTALLED AND REMOVE.
Take a look at the msilog for clues and detailed information about what happened in the installation. If you are running from an msi, you can use the commandline
.msi /lv logfile.log
or if you are calling from setup.exe, use
setup.exe /v"/lv logfile.log"
these logs are handy for checking the values of properties, execution of CAs, etc...
PROGB_INSTALLED AND REMOVE.
Take a look at the msilog for clues and detailed information about what happened in the installation. If you are running from an msi, you can use the commandline
or if you are calling from setup.exe, use
setup.exe /v"/lv logfile.log"
these logs are handy for checking the values of properties, execution of CAs, etc...
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)