Setup created using Inno Setup 6.0.3 does not auto-restart Windows 2019 with default UAC settings

129 views
Skip to first unread message

vire...@gmail.com

unread,
Nov 25, 2019, 4:44:35 AM11/25/19
to innosetup
I have created a setup using Inno Setup 6.0.3 which requries to automatically restart Windows 2019 Server at the end.

However if the UAC setting are set as follows -
       User Account Control Setting: Notify me only when apps try to make changes to my computer (default)

And the user starts the setup by double clicking on the setup file in Windows explorer and then chooses  "Yes, restart the computer now" then I get the following error - 
      "Setup was unable to restart the computer. Please do this manually"

I have include the required [Setup] directives PrivilegesRequired and AlwaysRestart

[Setup]
PrivilegesRequired=admin

ChangesEnvironment=yes
AppName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName=test\MyProduct

AlwaysRestart=yes


The setup log does show that Inno setups code to restart Windows is called. 
2019-11-25 01:28:22.755   Process exit code: 1
2019-11-25 01:28:22.976   Need to restart Windows? Yes
2019-11-25 01:28:25.083   Deinitializing Setup.
2019-11-25 01:28:25.087   Restarting Windows.
2019-11-25 01:28:25.098   Log closed.

However the API ExitWindows fails since inno setup failed to elevate permission hence Windows does not start and the above mentioned error message is shown.

Note: 
  • Also if I explicilty run the setup by right click "Run as admin" then the automatic works fine.
  • If UAC is turned off i.e set to "Never notify..." then auto restart works even when user starts the setup by double clicking on the setup file in Windows explore.
Is this a known issue OR am I missing something in the [Setup] directives?

abq...@gmail.com

unread,
Dec 30, 2019, 10:48:10 AM12/30/19
to innosetup
On Monday, November 25, 2019 at 2:44:35 AM UTC-7, vire...@gmail.com wrote:

I have created a setup using Inno Setup 6.0.3 which requries to automatically restart Windows 2019 Server at the end.
...
Also if I explicilty run the setup by right click "Run as admin" then the automatic works fine.

I don't know the answer, but I would guess that it has something to do with the difference between the installer relaunching itself elevated vs. the end user starting it elevated in the first place. I agree that the behavior you describe seems unexpected.

My other question is: Why does your installer demand a restart? (This would greatly annoy me as a system admin and would need a very strong justification.)

Bill

Bernd Bührer

unread,
Sep 19, 2025, 8:03:11 AM (7 days ago) Sep 19
to innosetup
Have you found a solution to the reboot not working issue by now?

Eivind Bakkestuen

unread,
Sep 19, 2025, 3:44:37 PM (7 days ago) Sep 19
to inno...@googlegroups.com
Have you tested the latest version?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/86ed530a-1d1b-4974-b5d3-e7affd5db5acn%40googlegroups.com.

Bernd Bührer

unread,
Sep 22, 2025, 10:25:19 AM (4 days ago) Sep 22
to innosetup
Yes, i have the latest version 6.5.3
Reply all
Reply to author
Forward
0 new messages