Jump to content

A few reboot related questions


Recommended Posts

Hi guys,

thanks for having a look into this thread!

So far I have never used the reboot option in WPI but recently there is no way around it with some applications failing to install without a reboot because of pendingrenameoperations etc.

I know I can add the {REBOOT} command to a specific app. What I don´t know is, if there are solutions available for the following problems:

1. How do you guys modify the LogonCount value set in autounattend.xml that specifies an automatic logon during the Windows installation (Vista/Win7) ? I have set this value to 4 but that only covers one WPI session. If WPI reboots once or twice during the installation depending on what the user chooses to install, the value needs to be dynamically adapted. How do you guys do that ? What I wish for is that this value should be dynamically adapted depending on the number of reboots WPI does. For instance: no reboot -> no change. 1 reboot - add one autologon counts. 2 reboots - add two autologon counts etc ...

2. Is it possibly to set a {REBOOT} command to a category in WPI instead of setting it to individual apps ? I would like to do a reboot if one ore more apps of a certain category (f.i. development) has been selected and I would like that reboot to occur before one or more of those apps in that category are installed.

3. Is it possible to add a {REBOOT} command dynamically depending on the need ? I have come across some apps recently that won´t install if there is a reboot pending. Those apps obviously check for some keys set in the registry and won´t install if a reboot is pending. Do I have to write a script that checks those keys or does WPI already have a command for that and add a reboot command dynamically for an app that needs it ?

4. Last but not least I am wondering how this reboot affects the RunOnceEx Process. I am starting WPI in a series of RunonceEx Commands. Of course I don´t want the next Runonce entry after WPI to start until WPI has completely finished. If I reboot during the WPI installation will Runonce stay at the value it is at until WPI has completely finished or will it advance during the first reboot ? (could test this myself but maybe someone already knows the answer).

Thanks for your help !

Alex

Link to comment
Share on other sites


1) Right now it does not take this into account. I will make it do as you suggested. Good idea.

2) No. You would have to either numerically or alphabetically make an entry with {REBOOT} the first in the category.

3) If you can tell me what reg keys to watch I can look into it.

4) Honestly, I forget. My install doesn't require a reboot. Anyone?

Link to comment
Share on other sites

Hi Mark,

thanks for your reply !

1) Right now it does not take this into account. I will make it do as you suggested. Good idea.

Thats great, thanks !

2) No. You would have to either numerically or alphabetically make an entry with {REBOOT} the first in the category.

But then the reboot would occur either always (if I force the "reboot app") or only if the user selects it. What I want would be to do a reboot only if a user selects one or more apps of a certain category. But since I don´t know which app he chooses I can´t add the reboot command to an app. I also cannot add it to every app of that category because then there would be numerous reboots.

The idea behind this is that I have recently come across numerous apps all belonging to the Development department (SQL Server 2008 Clienttools, Visual Studio 2008, Pyhon 2.6, Tortoise SVN ...) that won´t install together with all the usual apps like Office etc. because of pending reboot operations. So my idea was that if the user chooses one or more apps from the development category that a reboot occurs before one of those apps are installed.

3) If you can tell me what reg keys to watch I can look into it

The most important would be this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

If this key exists and there are values in it then a restart is pending. If the key does not exist then a restart is not pending. But there may be other keys in the registry too.

I have found a vb script that checks for those entries:

Link on MS Blog

It would be nice if there was a command that starts a reboot only if there are entries in that key.

It would be even nicer if that command could also be tied to a category (see above topic).

4) Honestly, I forget. My install doesn't require a reboot. Anyone?

Yeah, I still haven´t come around to test this so if someone knows the answer ... thanks !

One more thing:

It would be nice if a reboot could trigger a small popup that tells the user that a restart is pending.

I have written a small hta for this but maybe this could be somehow added as a function in WPI so it has the same looks as the theme etc.

<html>
<HTA:APPLICATION
Caption="no"
>

<script language = "VBScript">
Sub Window_OnLoad
window.resizeTo 550,140
idTimer = window.setTimeout("PausedSection", 3000, "VBScript")
End Sub

Sub PausedSection
window.close
End Sub
</script>

<body bgcolor="Silver" scroll=no>
<font color="red" face="Times New Roman" size="4"> A restart is required before we can install SQL Server 2008 Clienttools </font>
<font color="red" face="Times New Roman" size="4"> Installation will continue after the next restart ... </font>
</body>
</html>

Bye,

Alex

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...