1

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.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
Szerie
  • 11
  • 3
  • The setup.exe will be doing the uninstall by calling MSI API functions, so that's unlikely to be the cause. Also list the applications - if any of them are permanent (such as Windows Explorer) then this might be expected behavior. The usual method of debugging is to create a verbose log of the uninstall with msiexec /x {the productcode} /l*vx [path to a log file] and post the log somewhere for us, – PhilDW Feb 15 '18 at 19:19

2 Answers2

0

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.

Szerie
  • 11
  • 3
  • You posted this as an answer. Does that mean the issue has been solved? If this is just more information it needs to be added to the original question, not posted as an answer. – PhilDW Feb 16 '18 at 18:20
  • @PhilDW, no, I have posted it as an answer because it was to long to post it as an comment. I am sorry for possible missunderstandings. The issue is still not solved. When I try to run msiexec from command prompt running as an admin it works correctly no matter what level of UAC is set. It is strange because if I try to uninstall application from windows programs and features then prompt like "Do you want to allow the program to make changes on this computer?" is appearing. So it should also be running with admin privilages after clicking "yes". Any idea what is the root cause of the problem? – Szerie Feb 20 '18 at 07:55
  • The intended way is to add the information to your original post, that's what Edit is for. – PhilDW Feb 20 '18 at 17:56
0

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

Bill
  • 132
  • 1
  • 1
  • 10