Sign in to follow this  
Followers 0
am632

Restart and Continue Help

3 posts in this topic

#1 ·  Posted (edited)

Hi, I dont kno where to start with this code but basically i have a script that installs windows updates, but after certain updates i would like the computer to restart and continue where it left off. Here is an example of what I think the code should look like.

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Media Player\KB968816_WM9","DisplayName")
if @error > 0 Then
Run("high-pri1\Security Update for Windows Media Format Runtime 9, 9.5 & 11 for Windows XP SP 3 (KB968816)\X86-en-windowsxp-windowsmedia-kb968816.exe /q /norestart")
SplashTextOn("High Priority Updates", "Installing High Priority Update 5 of 14", "500", "100", "-1", "-1", 32, "Courier New", "12", "400")
ProcessWaitClose("X86-en-windowsxp-windowsmedia-kb968816.exe")
Else
sleep(0)
EndIf

;Would LIke to Restart here and continue from this point!

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Media Player\KB973540_WM9","DisplayName")
if @error > 0 Then
Run("high-pri1\Security Update for Windows XP Service Pack 3 (KB973540)\X86-en-windowsxp-windowsmedia-kb973540.exe /q /norestart")
SplashTextOn("High Priority Updates", "Installing High Priority Update 6 of 14", "500", "100", "-1", "-1", 32, "Courier New", "12", "400")
ProcessWaitClose("X86-en-windowsxp-windowsmedia-kb973540.exe")
Else
sleep(0)
EndIf

EDIT: I looked at the shutdown/restart command but not sure about the continue part, also tried searching but not found anything!

Edited by am632

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

At the start of your script, make/read a custom registry entry that writes the last Hotfix/Update installed. As Hotfixes are installed, add them to your custom registry entry. Before a reboot, write the last Hotfix/Update to be installed, as well as adding your script to the Startup or Run Once registry entry. When all the updates have completed, remove your script from the Startup or Run Once registry entry

Edited by Varian

Share this post


Link to post
Share on other sites

At the start of your script, make/read a custom registry entry that writes the last Hotfix/Update installed. As Hotfixes are installed, add them to your custom registry entry. Before a reboot, write the last Hotfix/Update to be installed, as well as adding your script to the Startup or Run Once registry entry. When all the updates have completed, remove your script from the Startup or Run Once registry entry

thank you very much, i will do this and post results for every1 to see

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0