am632 Posted September 13, 2010 Share Posted September 13, 2010 (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 September 13, 2010 by am632 Link to comment Share on other sites More sharing options...
Varian Posted September 13, 2010 Share Posted September 13, 2010 (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 September 13, 2010 by Varian Link to comment Share on other sites More sharing options...
am632 Posted September 13, 2010 Author Share Posted September 13, 2010 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 entrythank you very much, i will do this and post results for every1 to see Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now