1

We have been using Installscript installer created using InstallShield 2015 SP2 tool for installing our applications from past many years, but while working on our new release, I have been getting a new dialog box at the end of the UnInstallation process of this Installscript installer. It displays message as uninstall complete and gives two radio button option at the bottom of the dialog box mentioned below.

  1. Yes, I want to restart my computer now.
  2. No, I will restart my computer later.

However, there is no such code added in the Installscript project of the installer which asks for restart once uninstallation is completed. I did searched on google but no luck. Hope anyone knows how to stop this dialog box from appearing at the end of uninstallation of the installer.

SRP
  • 999
  • 4
  • 21
  • 39
  • Is this an Installscript MSI or a legacy Installscript setup? (the latter being non-Windows Installer). – Stein Åsmul Feb 01 '20 at 03:35
  • It is an Installscript exe and not Installscript msi. The Installshield application offer three types of projects to create an installer i.e. Basic msi, Installscript msi and Installscript. Mine, installer is created in installscript project. – SRP Feb 03 '20 at 05:16

1 Answers1

0

Short Answer: My guess is that an in-use file (locked) has caused the scheduling of an automatic reboot prompt to appear. Locked files are almost always the cause of such problems and the prompt is a built-in feature of MSI itself. The file in-use could be a service file that is not shut down properly (timeout or design errors in the MSI). Some details below. You should enable logging to work out what triggered the reboot prompt.


Docs Microsoft: Logging of Reboot Requests. Sample from log file:

Info 1603. The file E:\testdb\Test\CustAct2.dll is being held in use.

Info 1903.Scheduling reboot operation: Deleting file [filename]. Must 
reboot to complete operation.

Logging: You should enable logging to work out what triggered the reboot prompt. Here is an answer on logging: Enable installation logs for MSI installer without any command line arguments. You can 1) enable the logging policy and then you can find a log for each uninstall that is run in the TEMP folder. 2) You can also invoke the uninstall with msiexec.exe /x and specify a logging location there in the command line. See the linked answer for details.


Uninstall Logging: See section 3 here for uninstall logging commands: Uninstalling an MSI file from the command line without using msiexec

msiexec.exe /x "c:\filename.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
msiexec.exe /x {11111111-1111-1111-1111-11111111111X} /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress

Reboot Prompt Cause: Most likely the cause of the reboot prompt is a file that is in use and hence could not be removed. MSI has auto-magic features to then trigger a reboot to replace or remove the file. A restart makes that possible. There are also many other potential causes for the reboot prompt. You could have stuff registered that needs a reboot to properly unregister. Along the same lines as files in use, but it could involve all kinds of registration system-wide.

Services: A special case of files in use are services. Do you have any in your setup? Very often the reboot prompt is caused by the service not shutting down properly. This can be because of timing issues (it is too slow to stop) or there are no proper commands in the setup for uninstallation scenarios to stop the service as it should on uninstall.


REINSTALLMODE: Note that setting the REINSTALLMODE property to "amus" - force overwrite (files and registry) - has shown itself to lead to many more reboot prompts for many MSI packages on installation (can affect uninstall too, though I don't see it set so often for uninstall).


Restart Manager: There are new features in Windows to deal with the problems of rebooting. The overall idea is to prefer to shut down applications auto-magically with a restart parameter registered for the application to restart itself after the deployment operation - rather than triggering system reboots. There is information about this feature here:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • @Stien Asmul, It is not an msi project but it is an Installscript installer having an exe extension and not msi. so, how to do i generate a reboot log for an installscript installer? – SRP Feb 03 '20 at 05:17
  • I am not an expert on Installscript setups. [Please see this answer](https://stackoverflow.com/a/9900873/129130). It seems you need to run in silent mode for the Setup.log file to be generated, and you likely need to run the setup first to capture a dialog response file. Quite complicated. Did you check the system's **"Event Log"**? **`Winkey`** + Tap **`R`** + **`eventvwr.msc`** + **`Enter`**. Check all log variants (**`Program`**, **`Security`**, **`System`**, **`etc...`**). – Stein Åsmul Feb 03 '20 at 20:28
  • Deployment expert Stefan Kruger's http://installsite.org/ might have something on this, I haven't had the time to check. Quick link to that [Setup.exe Installshield help page](https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/IHelpSetup_EXECmdLine.htm). ***Looking at it you should probably try the ``/debuglog`` switch first?*** Might not work it says - for your project type - worth a try. Could have changed. – Stein Åsmul Feb 03 '20 at 20:33
  • Well, what i think is causing the installer to display the restart windows at the end of uninstallation is, whenever you try to uninstall the installer as soon as it got installed i.e. (within 5 to 7 minutes) then it displays that reboot dialog box at the end otherwise if you try to uninstall after 10 to 15 minutes then it doesn't display the restart dialog box. I tried this and it didn't displayed that dialog box. The possible reason is my installer has thousand files and couple of registry entries that is deploys and creates and some of them might need some time to get unlocked.. – SRP Feb 05 '20 at 06:41
  • However, i'll try to generate the log and see which files is causing this issue. – SRP Feb 05 '20 at 06:42
  • I suppose you could [**`try resmon.exe as described here`**](https://superuser.com/a/643312/11906). I haven't tried, but you could try to run it when your **`setup.exe`** asks for a reboot and then - in the top pane (uncollapse it) - check the check box next to **`setup.exe`** and see if there are any locked files in the list of ***"Associated Handles"*** that you recognize? There are other tools too such as [**`Process Explorer`**](https://en.wikipedia.org/wiki/Process_Explorer) and [**`Process Monitor (Procmon)`**](https://en.wikipedia.org/wiki/Process_Monitor). – Stein Åsmul Feb 05 '20 at 12:58
  • [Handle.exe](https://learn.microsoft.com/en-us/sysinternals/downloads/handle) run in admin mode to dump the whole list of open handles can also work maybe? – Stein Åsmul Feb 05 '20 at 13:11