cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yarivitz
Level 2

stop the procces when uninstalling it

Hi,

I am installing my software.
Now, I am trying to uninstall.
When the software is not running everything is OK.
When it is running the uninstall is stck for a moment but tells me the it is successful, but the EXE file is still running and still in on the hard drive in its directory.
How do I tell the InstallSheild to stop the proccess and then it will be uninstalled.

I am using Windows XP and Bsic MSI project.

Thanks.
Labels (1)
0 Kudos
(3) Replies
snip_1415
Level 4

Hi,

Please let me know if you see any "File in use" dialog during uninstallation?

How r u uninstalling the application?? R u using Add\Remove, cmd line or what??
0 Kudos
petersonmike
Level 2

If you want to take a proactive approach AND you're familiar with inserting InstallScript code into your project (I don't do MSI, sorry), you could make use of the FILE_LOCKED function with something like this:

szQuestion = "Please verify that My Application has been shutdown before continuing. Do you want to continue?";
szMyExe = INSTALLDIR ^ "MyExe.exe";
ExeRunningLoop:
if ( Is ( FILE_LOCKED, szMyExe ) ) then
if ( AskYesNo ( szQuestion, NO ) = NO ) then
abort;
else
Delay ( 5 );
goto ExeRunningLoop;
endif;
endif;
0 Kudos
Earthshine
Level 4

szCmdLine = "/im YourEXENameHere.exe /f";
LaunchAppAndWait("taskkill", szCmdLine, LAAW_OPTION_WAIT);
0 Kudos