projector1 Posted March 12, 2008 Posted March 12, 2008 (edited) anybody able to knock up a vbscript that will Stop Automatic Update Service delete "%Windir%\SoftwareDistribution" folder. delete "%Windir%\windowsUpdate text file Start Automatic Update Service reboot system (all clients xp pro, windows installed on C drive) cheers Edited March 12, 2008 by projector1
tosca925 Posted March 12, 2008 Posted March 12, 2008 Drop this in a vbscript and put in in the Computer Section of a GPO that contaisn the computers in question. It forces the pc to check for updates and then leaves a marker in the reg, the next time the pc starts again it will check for the marker and not do the update. '--------------------8<---------------------- Set oShell = CreateObject("WScript.Shell") sRegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" ' suppress error in case values does not exist On Error Resume Next ' check for marker sIDDeleted = oShell.RegRead( sRegKey & "\IDDeleted") ' to be sure values is only deleted once, test on marker If sIDDeleted <> "yes" Then ' delete values oShell.RegDelete sRegKey & "\AccountDomainSid" oShell.RegDelete sRegKey & "\PingID" oShell.RegDelete sRegKey & "\SusClientId" ' Stop and start the Automatic updates service oShell.Run "%SystemRoot%\system32\net.exe stop wuauserv", 0, True oShell.Run "%SystemRoot%\system32\net.exe start wuauserv", 0, True ' Run wuauclt.exe with resetauthorization sCmd = "%SystemRoot%\system32\wuauclt.exe /resetauthorization /detectnow" oShell.Run sCmd, 0, True ' create marker oShell.RegWrite sRegKey & "\IDDeleted", "yes" End If '--------------------8<----------------------
ICT_GUY Posted March 12, 2008 Posted March 12, 2008 CCleaner does a very good job of getting rid of junk files including windows update crud, and I am pretty sure it can be run from a command line with "%ProgramFiles%\CCleaner\ccleaner.exe" /AUTO Not that relevant but ccleaner does a damn good job of cleaning up the detritus that xp leaves scattered around your hard drive and its free. (very good for pre ghost images too)
projector1 Posted March 12, 2008 Author Posted March 12, 2008 thanks for the reply sorry forgot to add, i need this as 90% of the clients are updating. The others are reporting error Error 0x80004002 in the windowsupdate.txt file. I manually carried out the steps mentioned above and it worked. I would like to simplify the task with a script!
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