0
votes

I am running installer with /verysilent /suppressmessagebox /norestart for upgrading my application (Windows Service). In PrepareToInstall(), I have code in place to check and stop an already running instance of my service using net stop <ServiceName>. I do log the output generated by net stop and it shows that the service has indeed been stopped. However, at times, the installer prompts that :

Message box (Abort/Retry/Ignore):

Setup was unable to automatically close all applications. It is recommended that you close all applications using files that need to be updated by Setup before continuing.

Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.

The logs show :

2017-05-10 23:47:38.851   Log opened. (Time zone: UTC-07:00)
2017-05-10 23:47:38.851   Setup version: Inno Setup version 5.5.9 (u)
2017-05-10 23:47:38.851   Original Setup EXE: C:\Windows\TEMP\installer.exe
2017-05-10 23:47:38.851   Setup command line: /SL5="$FD006E,3807712,131584,C:\Windows\TEMP\installer.exe" /verysilent /suppressmessagebox /norestart  /log=C:\ProgramData\&ltServiceName&gt\installer_2026493391.txt
2017-05-10 23:47:38.851   Windows version: 6.1.7601 SP1  (NT platform: Yes)
2017-05-10 23:47:38.851   64-bit Windows: Yes
2017-05-10 23:47:38.851   Processor architecture: x64
2017-05-10 23:47:38.851   User privileges: Administrative
2017-05-10 23:47:38.867   64-bit install mode: Yes
2017-05-10 23:47:38.867   Created temporary directory: C:\Windows\TEMP\is-OO761.tmp
.....
..... Some logs irrelevant to the issue at hand
.....
2017-05-10 23:47:39.148   Stopping &ltServiceName&gt Service - begin
2017-05-10 23:47:39.148   Command : /S /C ""net" stop &ltServiceName&gt &gt "C:\Windows\TEMP\is-OO761.tmp\~execwithresult.txt" 2&gt&1"
2017-05-10 23:47:39.257   Stopping &ltServiceName&gt Service - done
2017-05-10 23:47:39.257   The &ltService Display Name&gt service is stopping.
                          The &ltService Display Name&gt service was stopped successfully.

2017-05-10 23:47:39.366   RestartManager found an application using one of our files: &ltService Display Name&gt
2017-05-10 23:47:39.366   Can use RestartManager to avoid reboot? Yes (0)
2017-05-10 23:47:39.366   Starting the installation process.
2017-05-10 23:47:39.366   Shutting down applications using our files.
2017-05-10 23:47:39.382   Some applications could not be shut down.
2017-05-10 23:47:39.382   Message box (Abort/Retry/Ignore):
                          Setup was unable to automatically close all applications. It is recommended that you close all applications using files that need to be updated by Setup before continuing.

                          Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.

There are 2 issues :

  1. Why is message box displayed in /verysilent mode ? As per this fix, it should not be displayed in silent mode. As per documentation, I do see that :

    /SILENT, /VERYSILENT Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above).

  2. Why does RestartManager seem to still believe that the exe is running when it has already been stopped ? Has anyone else seen similar issues and is there a recommended way ? (say, add a 5 second pause after the net stop command)
1

1 Answers

2
votes

It's /SUPPRESSMSGBOXES, not /SUPPRESSMESSAGEBOX.


It can be an antivirus or similar, what blocks the file. If you try to move/delete the binary immediately after net stop, does it succeed?