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: Uninstall problem
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
‎Oct 09, 2007
12:53 PM
Uninstall problem
My installer has multiple components.
At uninstall if one of this components (.exe) is running, what should I do? InstallShield offers some automation for this?
Do I need to write InstallScript code? If, yes, some example will be great.
Thanks
At uninstall if one of this components (.exe) is running, what should I do? InstallShield offers some automation for this?
Do I need to write InstallScript code? If, yes, some example will be great.
Thanks
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2007
04:57 AM
No answer for this question?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2007
02:02 AM
Hi cornel_gav,
if you UNINSTALL your project and for example an exe is running the installer will tells you => close the exe and retry NORMALLY !!!!
Now, you can execute and script for to stop your exe !
for example if your exe is a service there is some installscript function as
startTheService, stopTheservice who take parametres.
you create a installscript function and a custom action who start this installscript with the condition REMOVE="ALL"
don't forget to place this action in the execute sequence BETWEEN installInitialize and installfiniliaze.
Have a nice day
Christophe
if you UNINSTALL your project and for example an exe is running the installer will tells you => close the exe and retry NORMALLY !!!!
Now, you can execute and script for to stop your exe !
for example if your exe is a service there is some installscript function as
startTheService, stopTheservice who take parametres.
you create a installscript function and a custom action who start this installscript with the condition REMOVE="ALL"
don't forget to place this action in the execute sequence BETWEEN installInitialize and installfiniliaze.
Have a nice day
Christophe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2007
04:09 PM
Cornel_gav,
Not sure if you are doing a installscript or MSI install, but the main InstallShield IDE has 3 tabs, when you are in the Installation Designer tab, click on the General Information->Product Properties, there is a ‘Executable File’ field. Enter the executable file of your product that you want to make sure is not running during the uninstall. InstallShield will check this file is running during uninstall, I believe.
If you have multiply executables, you will have to add code to handle each one.
For Installscript you could do something like this:
(Here I have stored the path to our executable in the registry during install, retrieve the path during the uninstall, check to see if file is there, then check to see if it is locked. If locked, stop the uninstall, all inside the OnMaintUIBefore() function.)
bFileThere = Is(FILE_EXISTS, g_svZehIBDir ^ "prg\\zm.exe");
if (bFileThere) then
bLocked = Is(FILE_LOCKED, g_svZehIBDir ^ "prg\\zm.exe");
if (bLocked) then
MessageBox(IFX_PRODUCT_NAME + " is in use, please exit application.", SEVERE);
abort;
endif;
endif;
Robert
Not sure if you are doing a installscript or MSI install, but the main InstallShield IDE has 3 tabs, when you are in the Installation Designer tab, click on the General Information->Product Properties, there is a ‘Executable File’ field. Enter the executable file of your product that you want to make sure is not running during the uninstall. InstallShield will check this file is running during uninstall, I believe.
If you have multiply executables, you will have to add code to handle each one.
For Installscript you could do something like this:
(Here I have stored the path to our executable in the registry during install, retrieve the path during the uninstall, check to see if file is there, then check to see if it is locked. If locked, stop the uninstall, all inside the OnMaintUIBefore() function.)
bFileThere = Is(FILE_EXISTS, g_svZehIBDir ^ "prg\\zm.exe");
if (bFileThere) then
bLocked = Is(FILE_LOCKED, g_svZehIBDir ^ "prg\\zm.exe");
if (bLocked) then
MessageBox(IFX_PRODUCT_NAME + " is in use, please exit application.", SEVERE);
abort;
endif;
endif;
Robert
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)