How to leave your machine in a pending reboot state ?

Got a problem you cannot solve? Try here.
Tommy
Posts: 27
Joined: Wed Oct 23, 2013 5:36 am

How to leave your machine in a pending reboot state ?

Postby Tommy » Mon Mar 30, 2015 7:14 am

Hello,

I would like to create a test MSI package, which leaves your machine in a pending reboot state letting the Windows Update service indicate a reboot request for the user.

Shall I try to overwrite a file being used during the installation?

Thanks.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: How to leave your machine in a pending reboot state ?

Postby FrancescoT » Mon Mar 30, 2015 1:38 pm

Dear Tommy,

for what I know, any pending state should be stored under;
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"
- "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations "
- "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired "

... but honestly I never had the need to programmatically set such condition.

Anyway you may try to overwrite a file being used during the installation, the MSI engine should automatically set the pending state in such cases.

Doing a google search I found this tool (which seems to be free) "http://exodusdev.com/products/whyreboot" ... you may try to see how it works.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Tommy
Posts: 27
Joined: Wed Oct 23, 2013 5:36 am

Re: How to leave your machine in a pending reboot state ?

Postby Tommy » Wed Apr 01, 2015 7:38 am

Thank you for your answer. I need this actually to set up a test case of an automated installation powered by Powershell.

I am trying to overwrite the file but the installer just hangs.

Code: Select all

Run Program d:\temp\timeout /T -1 /NOBREAK (WAIT)
Install Files D:\Temp\timeout.exe to d:\temp


I have set no attributes, properties and copy options on the "install Files" dialog.

Tommy
Posts: 27
Joined: Wed Oct 23, 2013 5:36 am

Re: How to leave your machine in a pending reboot state ?

Postby Tommy » Tue Apr 07, 2015 5:26 am

Can I launch this in the bootstrapper somehow ?

Code: Select all

Run Program d:\temp\timeout /T -1 /NOBREAK (WAIT)


Otherwise the installer hangs since it can not overwrite any file what it has itself started.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: How to leave your machine in a pending reboot state ?

Postby FrancescoT » Tue Apr 07, 2015 12:24 pm

if I haven't missed your question, you may try to use "Run Program" to execute "cmd.exe" and then to pass all the rest as "Run Program" parameters.
http://www.installaware.com/forum/viewtopic.php?f=2&t=4603

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Tommy
Posts: 27
Joined: Wed Oct 23, 2013 5:36 am

Re: How to leave your machine in a pending reboot state ?

Postby Tommy » Wed Apr 08, 2015 2:22 am

No. I just would like to run

Code: Select all

d:\temp\timeout.exe
with "Run Program" and in the next line I would like to install timeout.exe into d:\temp. But I guess the MSI engine can not do this unless timeout.exe started by another process.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: How to leave your machine in a pending reboot state ?

Postby FrancescoT » Wed Apr 08, 2015 1:02 pm

Honestly ...I haven't tried and I suppose as you that very probably it can't be possible.

:cry:
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 101 guests