Page 1 of 1
How to leave your machine in a pending reboot state ?
Posted: Mon Mar 30, 2015 7:14 am
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.
Re: How to leave your machine in a pending reboot state ?
Posted: Mon Mar 30, 2015 1:38 pm
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
Re: How to leave your machine in a pending reboot state ?
Posted: Wed Apr 01, 2015 7:38 am
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.
Re: How to leave your machine in a pending reboot state ?
Posted: Tue Apr 07, 2015 5:26 am
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.
Re: How to leave your machine in a pending reboot state ?
Posted: Tue Apr 07, 2015 12:24 pm
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
Re: How to leave your machine in a pending reboot state ?
Posted: Wed Apr 08, 2015 2:22 am
by Tommy
No. I just would like to run
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.
Re: How to leave your machine in a pending reboot state ?
Posted: Wed Apr 08, 2015 1:02 pm
by FrancescoT
Honestly ...I haven't tried and I suppose as you that very probably it can't be possible.
