Uninstall using .msi file - not able to close all requested applications

1.1k Views Asked by At

I am facing the problem using installer generated by InstallShield. The issue is appearing during uninstall process. setup.exe file requires administrator privileges. When I try to uninstall application using setup.exe file everything works as expected. But when I try to uninstall application from windows programs and features then uninstall is executing .msi file. In this scenario the result is that uninstall process is not able to close opened applications and the error "the setup was unable to automatically close all requested applications (...)" is appearing. I have checked the problem on different operating systems. It seems that on Windows 7 and 10 the problem is appearing but on Windows Server 2012R2 it works like expected (uninstall is able to close required applications). Any idea how to solve the issue? I would be grateful for tips.

2

There are 2 best solutions below

3
On

In meantime I found out accidentally that after changing UAC level and restarting the computer uninstall is able to close applications (previously I checked it without restart and there was no difference in behaviour so I thought it was not the issue). Thank you very much for your tip @PhilDW. I have changed UAC settings again and I tried to create logs and logs connected to the issue are presented below:

MSI (s) (B4:D0) [15:44:09:691]: RESTART MANAGER: Detected that application with id 15584, friendly name 'XYZ System Monitor', of type RmUnknownApp and status 1 holds file[s] in use. MSI (c) (4C:C8) [15:44:09:697]: RESTART MANAGER: Session opened. MSI (c) (4C:C8) [15:44:09:707]: RESTART MANAGER: Detected that application with id 15584, friendly name 'XYZ.Monitor.exe', of type RmCritical and status 1 holds file[s] in use. MSI (c) (4C:C8) [15:44:09:707]: Note: 1: 2262 2: ListBox 3: -2147287038 Action 15:44:31: ShutdownApplications. Shutting down applications MSI (s) (B4:D0) [15:44:32:071]: RESTART MANAGER: Successfully shut down all applications in the service's session that held files in use. MSI (c) (4C:C8) [15:44:32:071]: RESTART MANAGER: Successfully shut down all applications that held files in use. MSI (s) (B4:D0) [15:44:32:573]: Note: 1: 1611 The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation.

I don't understand why logs claim that all applications were successfully shuted down and then log claims something opposite.

0
On

The easiest way is to kill the process before it gets to that point in the installer. You will want to put this earlier in the InstallExucute sequence so that in runs in silent mode.

For example, in vbscript

Dim oShell : Set oShell = CreateObject("WScript.Shell")

oShell.Run "taskkill /im exeprocessname.exe", , True