InnoSetup installers all hang at end of install/uninstall in Windows 10

152 views
Skip to first unread message

Benjamin Shadwick

unread,
Jun 10, 2021, 10:22:34 PMJun 10
to innosetup
Trying to install/uninstall ImageMagick and git for Windows results in their InnoSetup (un)installers just hanging forever at the end of the process.

Is there some way to debug this? It seems to be a generic InnoSetup problem.

Benjamin Shadwick

unread,
Jun 10, 2021, 11:04:15 PMJun 10
to innosetup
Add Visual Studio Code to the list as well.

Gavin Lambert

unread,
Jun 11, 2021, 12:24:43 AMJun 11
to inno...@googlegroups.com
The first thing to try would be to run the installer with /LOG and see
how far it gets before it stops (though depending on the kind of hang it
might not have flushed everything to the log, so it could be misleading).

Having said that, this is likely to be something weird on your machine,
since these installers work for most everyone else.

Have you tried disabling your antivirus to see if that helps? Some of
them do very weird things.

Benjamin Shadwick

unread,
Jun 11, 2021, 1:03:50 AMJun 11
to innosetup
I've attached a log of the VSCode update install as run by Chocolatey. It ends probably 15 minutes before I finally killed the lowest-level process in ProcExp64.

I'm just using Windows Defender for antivirus. I tried disabling all of its protections and installing the vscode update again, but the exact same behavior occurred (log finished writing after 8 seconds, then nothing for 10+ minutes until I killed it).

I've also attached a screenshot of the .tmp binary's stack for the only thread that appears to be running.

Command line for the .tmp binary appears to be:
"C:\Users\bensh\AppData\Local\Temp\chocolatey\is-41O15.tmp\VSCodeSetup-x64-1.57.0.tmp" /SL5="$1109B6,78865845,828416,C:\Users\bensh\AppData\Local\Temp\chocolatey\vscode.install\1.57.0\VSCodeSetup-x64-1.57.0.exe" /verysilent /suppressmsgboxes /mergetasks="!runCode, desktopicon, quicklaunchicon, addcontextmenufiles, addcontextmenufolders, associatewithfiles, addtopath" /log="C:\Users\bensh\AppData\Local\Temp\chocolatey\vscode.install\1.57.0\install.log" 

Untitled.png
install.zip

Benjamin Shadwick

unread,
Jun 11, 2021, 1:13:00 AMJun 11
to innosetup
I also get the same looking log if I run from a command line instead of Chocolatey. In addition, the installation UI looks like this - which is very similar to what I was getting with ImageMagick.

Note that the window is actually frozen - it doesn't come to the front when I click on it, the minimize button doesn't work, etc.

Untitled.png

Jernej Simončič

unread,
Jun 11, 2021, 5:38:05 AMJun 11
to Benjamin Shadwick on [innosetup]
On Friday, June 11, 2021, 07:03:50, Benjamin Shadwick wrote:

> I've attached a log of the VSCode update install as run by Chocolatey. It ends probably 15 minutes before I finally killed the lowest-level process in ProcExp64.

Weird, it looks like it finishes the actual install, but then hangs when checking if Windows needs to be restarted (next line in log should be "Need to restart Windows?"

--
< Jernej Simončič ><><><><>< https://eternallybored.org/ >

Only useless documentation transcends the first two laws.
-- Arnold's Third Law of Documentation

Benjamin Shadwick

unread,
Jun 13, 2021, 12:39:36 PMJun 13
to innosetup
Interesting. Given that data point, is there anything I can do to troubleshoot why it might be freezing at that step?

Martijn Laan

unread,
Jun 14, 2021, 10:25:45 AMJun 14
to inno...@googlegroups.com
Op 13-6-2021 om 18:39 schreef Benjamin Shadwick:
Given that data point, is there anything I can do to troubleshoot why it might be freezing at that step?

I would start by adding the following to a test setup created by yourself:

[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssPostInstall then
    Log('Progressing to ssPostInstall.');
end;


This will give you a bit more info where it can't progress as shown by the code below. Notes about this code:
  • Logging 'Installation process succeeded.' is the very last thing done by PerformInstall.
  • ProcessRunEntries and RestartApplications also do their own logging so are unlikely to be the problem.
  • SetStep(ssPostInstall, True); is the line causing the [Code] snippet above to be executed.
  • RefreshEnvironment does a SendMessageTimeout with a five second time-out for bad apps. As MS docs say: if you specify a five second time-out period and there are three top-level windows that fail to process the message, you could have up to a 15 second delay.
  • MS docs don't say if SHChangeNotify can be delayed by bad apps or not.
  • All these things except SetStep will only be called if your test setup requests this.

Greetings,
Martijn Laan



Message has been deleted

Benjamin Shadwick

unread,
Jun 15, 2021, 9:42:07 PMJun 15
to innosetup
Update: I tried the suggested code with InnoSetup 6.2.0, and there was no freeze.

The end of the log looks like this:
2021-06-15 18:39:36.348   Installation process succeeded.
2021-06-15 18:39:36.351   Progressing to ssPostInstall.
2021-06-15 18:39:36.351   Need to restart Windows? No
2021-06-15 18:39:38.877   Deinitializing Setup.
2021-06-15 18:39:38.883   Log closed.

Since this doesn't replicate the freeze, I'm not sure it's helpful. What else can I try?

On Tuesday, June 15, 2021 at 6:24:11 PM UTC-7 Benjamin Shadwick wrote:
I'm just an end user, so this is currently over my head. Thanks, though; I'll think about it.

Gavin Lambert

unread,
Jun 15, 2021, 10:59:17 PMJun 15
to inno...@googlegroups.com
On 16/06/2021 1:42 pm, Benjamin Shadwick wrote:
> Since this doesn't replicate the freeze, I'm not sure it's helpful. What
> else can I try?

For the installers that do freeze, you can check which version of Inno
they were compiled with by right-clicking the title bar and choosing
"About Setup".

You could compare these and see if common patterns emerge. (Presumably
you've already tried the latest available download of those apps?)

If you're feeling adventurous, you could try downloading the same
version of Inno as the latest one that freezes, and see if that freezes
with the test script too -- if it doesn't, that means that something
else is needed in the test script to provoke the freeze; if it does,
then you can try later versions to narrow down which version appears to
fix the freezing problem, then report the results here.

It does seem like something weirdly specific to your computer, though,
not something that most users run into.

Benjamin Shadwick

unread,
Jun 16, 2021, 11:07:48 PMJun 16
to innosetup
Checking the list of apps I've mentioned - which I just verified still freeze on install and uninstall:
Git for Windows 2.32.0 uses Inno Setup 6.1.2
ImageMagick 7.1.0-0 uses Inno Setup 6.1.2
Visual Studio Code 1.57.0 uses Inno Setup 6.0.5 (u)

I noticed that some Inno 5.x installers seem to work fine, but I can't remember which apps I saw using them.

Additionally, Inno Setup 6.2.0 itself uses Inno Setup 6.2.0 and installs fine.

Jordan Russell

unread,
Jun 22, 2021, 5:37:14 PMJun 22
to innosetup
On Tuesday, June 15, 2021 at 8:42:07 PM UTC-5 Benjamin Shadwick wrote:
Since this doesn't replicate the freeze, I'm not sure it's helpful. What else can I try?

Can you reproduce the hang with the Example1.iss example script included with Inno Setup?

If not, then see if adding ChangesAssociations=yes or ChangesEnvironment=yes to the [Setup] section causes the hang to appear.

Like Martijn mentioned, these notifications may be delayed if you have a bad app running that has created one or more top-level windows, but isn't processing messages.

Other things to check:

- Open Task Manager and kill off as many unnecessary processes as you can -- one might be the "bad app".

- To rule out this being a problem specific to your user profile, create a new admin user account on your system, log in to it, and without changing any settings, try running one of the affected installers.

- Leave the installer running in the seemingly-hung state for a few hours and see if eventually finishes.

- I don't know if you're proficient with a debugger, but it would be interesting to know the arguments being passed in that user32!SendMessageTimeoutW call seen in the call stack. AFAICS, Inno Setup itself only calls SendMessageTimeout when handling ChangesEnvironment=yes. But I suppose it's possible that something else outside our code is triggering a SendMessageTimeout call, perhaps with a much longer timeout.
Reply all
Reply to author
Forward
0 new messages