+ Post New Thread
Results 1 to 4 of 4
Scripts Thread, script needed to kick start WSUS clients in Coding and Web Development; anybody able to knock up a vbscript that will Stop Automatic Update Service delete "%Windir%\SoftwareDistribution" folder. delete "%Windir%\windowsUpdate text file ...
  1. #1
    projector1's Avatar
    Join Date
    Nov 2005
    Posts
    460
    Thank Post
    70
    Thanked 1 Time in 1 Post
    Rep Power
    18

    script needed to kick start WSUS clients

    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
    Last edited by projector1; 12th March 2008 at 09:51 AM.

  2. #2
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22
    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\Wi ndowsUpdate"

    ' 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<----------------------

  3. #3
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,261
    Thank Post
    646
    Thanked 283 Times in 204 Posts
    Rep Power
    104
    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)

  4. #4
    projector1's Avatar
    Join Date
    Nov 2005
    Posts
    460
    Thank Post
    70
    Thanked 1 Time in 1 Post
    Rep Power
    18
    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!

SHARE:
+ Post New Thread

Similar Threads

  1. Getting WSUS to see clients
    By SYSMAN_MK in forum Windows
    Replies: 18
    Last Post: 4th February 2009, 03:55 PM
  2. WSUS Console. Clients not appearing
    By Dos_Box in forum Windows Server 2000/2003
    Replies: 10
    Last Post: 21st November 2008, 03:58 AM
  3. Replies: 3
    Last Post: 21st February 2008, 08:50 AM
  4. WSUS and clients
    By button_ripple in forum Windows
    Replies: 11
    Last Post: 6th February 2008, 09:32 AM
  5. WSUS cannot see clients
    By ipconfig/HELP in forum Windows
    Replies: 7
    Last Post: 24th May 2007, 10:56 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •