PDA

View Full Version : Problem with Reboot and Resume on Server 2008



NewsArchive
08-23-2012, 12:21 AM
Hello,

Has anyone run into a problem with reboot and resume not rebooting on
Windows Server 2008?
I have definitely confirmed the script is excuting the command.
I've tried both slient and non-slient and either way it is not rebooting
the server.

TIA,
Rick

NewsArchive
08-23-2012, 12:22 AM
I should add that if I reboot manually the installation does resume so
the registry key is being properly set.
It just isn't rebooting.

Thanks,
Rick

NewsArchive
08-23-2012, 12:22 AM
Maybe you need admin privileges? Not a sys admin, so its just a guess.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
08-23-2012, 12:23 AM
The installer is running As Administrator.

Rick

NewsArchive
08-23-2012, 01:13 AM
Rick,

Applications have to use the ExitWindowsEx Windows API to reboot/restart a
machine. SetupBuilder makes use of a method similar to this:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa376871(v=vs.85).aspx

If the reboot function does not reboot then something on this machine
"blocks" that process.

BTW, did you try the reboot example from the Examples Package? Does it also
not reboot that machine?

Friedrich

NewsArchive
08-24-2012, 12:39 AM
Good idea.

Turns out the sample works. So it has to be something in my script.
Any ideas? :)

Rick

NewsArchive
08-24-2012, 12:40 AM
Hi Rick,

> Good idea.
>
> Turns out the sample works. So it has to be something in my script.
> Any ideas? :)

Are you using the "Set Installer Flag ($SB_RESTARTFLAG$)" function to
suppress a reboot?

You can send your .sb7 project to support [at] lindersoft [dot] com and we
can do a quick review,

Friedrich

NewsArchive
08-29-2012, 01:12 AM
Hi Friedrich,
I tracked this down. If you do a Run Program non-elevated before issuing
the reboot and resume the reboot does not happen.
If the Run Program executes the program elevated it works correctly.

I modified the reboot and resume example to demonstrate the issue and
emailed it to support.

Thanks,
Rick

NewsArchive
08-29-2012, 04:16 AM
Hi Rick,

> I tracked this down. If you do a Run Program non-elevated before issuing
> the reboot and resume the reboot does not happen.
> If the Run Program executes the program elevated it works correctly.
>
> I modified the reboot and resume example to demonstrate the issue and
> emailed it to support.

Very interesting finding. After you launched an application non-elevated
from an elevated running application, the ExitWindowsEx Windows API to
reboot/restart a machine returns "ERROR_PRIVILEGE_NOT_HELD 1314 (0x522) -->
A required privilege is not held by the client.".

This seems to be a Windows bug (or limitation). I have reported this to
Microsoft, but I don't expect a fix for it. Running an application
non-elevated from an elevated application is an undocumented function of
Vista+ and so not officially supported by Microsoft.

We'll add a warning to the "Reboot/Resume..." function documentation.

Friedrich

NewsArchive
08-29-2012, 04:17 AM
BTW, this happens on all UAC-aware operating systems, including Windows 8
RTM.

Friedrich

NewsArchive
08-29-2012, 04:17 AM
Same problem with the alternate "InitiateSystemShutdown" Windows API. So I
am afraid there is not workaround possible because this is a Windows UAC
bug/limitation :-( If you launch an application non-elevated from the
elevated setup.exe then the reboot/restart function fails with
ERROR_PRIVILEGE_NOT_HELD 1314 (0x522) --> A required privilege is not held
by the client.".

Friedrich

NewsArchive
08-30-2012, 12:24 AM
Hi Rick,

> I tracked this down. If you do a Run Program non-elevated before issuing
> the reboot and resume the reboot does not happen.
> If the Run Program executes the program elevated it works correctly.

I have low-level debugged this issue (reboot machine after launching a
program non-elevated from an elevated setup) and I think that I have
workarounds. We need two different methods to work around this issue
because Microsoft changed (improved) the UAC mechanism in Windows 8.

Very interesting problem. Thank you for bringing this to my attention.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

Helping You Build Better Installations
SetupBuilder "point. click. ship"
Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-30-2012, 12:25 AM
Hi Friedrich,

Glad I could keep you entertained. :)
I worked around the issue in my installation script so no hurry.

Thanks,
Rick