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
- :
- How to run a .bat file when UnInstalling
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
‎Aug 23, 2007
08:53 PM
How to run a .bat file when Uninstalling
I somehow am able to run an install.bat file during installation.
But cant figure out how to run a UnInstall.bat when uninstall/Remove is done.
Kindly suggest.
But cant figure out how to run a UnInstall.bat when uninstall/Remove is done.
Kindly suggest.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2007
12:34 AM
Can you provide a little background on your requirement?
What type of IS project is it? Basic MSI? Installscript?
What's the reason you want to run the uninstall.bat? Doesn't the installer take care of uninstallation?
Where is the uninstall.bat located? INSTALLDIR?
What type of IS project is it? Basic MSI? Installscript?
What's the reason you want to run the uninstall.bat? Doesn't the installer take care of uninstallation?
Where is the uninstall.bat located? INSTALLDIR?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2007
10:08 AM
If it's InstallScript; perhaps try in the OnEnd() section:
if (REMOVEALLMODE) then
LaunchAppAndWait (szBatchFile, szParam, LAAW_OPTION_HIDDEN);
endif;
if (REMOVEALLMODE) then
LaunchAppAndWait (szBatchFile, szParam, LAAW_OPTION_HIDDEN);
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 30, 2007
08:40 PM
I am using Basic MSI Project. Have to do some tasks like registering dlls, installing and starting .NET services when i install. And need to do the reverse when I do the uninstall.
I have an Install.bat which first gets copied on the target machine when installation takes place. Its is then run/executed. (have this .bat called under "Custom Actions and Sequences"->"Custom Actions")
But dunno what to do to call the UnInstall.bat during UnInstallation. (I am a C++?C# programmer. Never done InstallShield stuff before!) Whatever I have done so far is just based on general browsing of the InstallShield.
Regards
I have an Install.bat which first gets copied on the target machine when installation takes place. Its is then run/executed. (have this .bat called under "Custom Actions and Sequences"->"Custom Actions")
But dunno what to do to call the UnInstall.bat during UnInstallation. (I am a C++?C# programmer. Never done InstallShield stuff before!) Whatever I have done so far is just based on general browsing of the InstallShield.
Regards
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 30, 2007
08:44 PM
Is there any specific Property/Custon Action that I need to specify like "Execution Scheduling" for the UnInstall.bat Custom Action before the file is removed from the target machine?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 31, 2007
12:36 AM
If your problem is that the uninstall.bat file is getting removed from the system before the script is run, try adding the custom action that calls it before the RemoveFiles action.
A workaround could be to add it to support files and call it from SUPPORTDIR using LaunchAppAndWait
A workaround could be to add it to support files and call it from SUPPORTDIR using LaunchAppAndWait
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 31, 2007
09:05 AM
Please see this newsletter tip for information about the condition you'd use on your action (PDF warning): http://www.macrovision.com/webdocuments/PDF/msiconditions.pdf.
To occur before files are removed, you'd probably want to schedule your action before the RemoveFiles action.
To occur before files are removed, you'd probably want to schedule your action before the RemoveFiles action.