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: Custom Action BEFORE prior version uninstall?
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
‎Sep 17, 2010
02:01 PM
Custom Action BEFORE prior version uninstall?
I need to stop a service that was incorrectly installed on a prior version of the application. When installshield goes to upgrade it runs the uninstaller from the prior version first so it seems I can't add a custom action before that happens.
Is there a was to add a custom/action step that fires BEFORE the prior version's uninstaller kicks in?
Is there a was to add a custom/action step that fires BEFORE the prior version's uninstaller kicks in?
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
02:08 PM
If you're running new versions from the InstallShield environment, it could be InstallShield removing the old version first instead of your installer. You can turn this off using Tools > Options > Preferences > Uninstall before installing. Once you make that change, your new version will behave as it will out in the world.
Otherwise, if the old version is being removed, it's a major upgrade; so you should be able to put your custom code before RemoveExistingProducts to ensure it runs before the old version is removed.
Otherwise, if the old version is being removed, it's a major upgrade; so you should be able to put your custom code before RemoveExistingProducts to ensure it runs before the old version is removed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
02:26 PM
Now I am scared. The custom action I added is sequence# 6 in Install->Execute and RemoveExistingProducts is #1500.
Is there a simple custom action like a messagebox I can show to make sure I am actually hitting the step before RemoveExistingProducts?
Sorry I am new to InstallShield and I just inherited a huge project with (of course) no documentation.
Thanks for the help.
Is there a simple custom action like a messagebox I can show to make sure I am actually hitting the step before RemoveExistingProducts?
Sorry I am new to InstallShield and I just inherited a huge project with (of course) no documentation.
Thanks for the help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
02:35 PM
Easiest for quick testing is probably a new "Error" custom action, which displays a message and then exits the installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
03:02 PM
Ok that worked.
Now I just need to call in vbSCript:
net stop MyService
Now I just need to call in vbSCript:
net stop MyService
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
03:23 PM
Tried to create a vbscript in the custom action to stop the service like:
LaunchAppAndWait(WINDIR ^ "system32" ^ "net.exe", "stop InstallTaskService", LAAW_OPTION_WAIT|LAAW_OPTION_HIDE);
And it doesn't work!
Any ideas....maybe I'll try to put a message box in there. Argh.
LaunchAppAndWait(WINDIR ^ "system32" ^ "net.exe", "stop InstallTaskService", LAAW_OPTION_WAIT|LAAW_OPTION_HIDE);
And it doesn't work!
Any ideas....maybe I'll try to put a message box in there. Argh.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2010
05:20 PM
If you do need to go down the custom action route, perhaps use a launch-an-EXE action that launches net.exe? (You'll probably want to add conditions to ensure it runs only when you want---not on uninstall, for example---but first things first.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2010
05:59 AM
I got it to work using ShellExecute. Not sure why I vbscript doesn't work.