How to leave your machine in a pending reboot state ?

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

How to leave your machine in a pending reboot state ?

Post by Tommy »

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 ?

Post by FrancescoT »

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 ?

Post by Tommy »

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 ?

Post by Tommy »

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 ?

Post by FrancescoT »

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/viewt ... 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 ?

Post by Tommy »

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 ?

Post by FrancescoT »

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
Post Reply