21.10.2019

Inno Setup Uninstall Application Running Another Users

  1. Inno Setup Silent Uninstall
Inno Setup Uninstall Application Running Another UsersBefore

Check theseThere are several ways. Use the to prevent the uninstaller from proceeding, when an application is running. SetupAppMutex=MyProgMutexThe application has to create the mutex specified by the directive. See the linked AppMutex directive documentation for examples.If you want to have the uninstaller kill the application, when it is still running, use this code instead: function InitializeUninstall: Boolean;varErrorCode: Integer;beginif CheckForMutexes('MyProgMutex') and(MsgBox('Application is running, do you want to close it?' ,mbConfirmation, MBOKCANCEL) = IDOK) thenbeginExec('taskkill.exe', '/f /im MyProg.exe', ', SWHIDE,ewWaitUntilTerminated, ErrorCode);end;Result:= True;end;As with the AppMutex directive above, the application has to create the mutex specified in the call.Note that for installer, you do not have to code this. The installer has restart manager built-in.See.

Inno

Inno Setup Silent Uninstall

Run another installer in an Inno Setup installation. To answer your third question first: Yes, you should do this. In order to do it properly, you need to add this functionality to the uninstaller of the second application (i.e. The one your app is dependent on). See Uninstall event functions in the Inno Setup help. Setup: AppMutex Description: This directive is used to prevent the user from installing new versions of an application while the application is still running, and to prevent the user from uninstalling a running application.