WSUS client Fails

3 views
Skip to first unread message

Rob

unread,
Jul 14, 2005, 11:58:03 PM7/14/05
to
I just read the KB555351 article. It appears I have about 600 existing PCs
that the WSUS client will not report correctly to the WSUS server because the
PCs were imaged using Ghost. I understand how to prevent future
reoccurences, but how do I correct the existing PCs?
--
Rob J

Torgeir Bakken (MVP)

unread,
Jul 15, 2005, 6:56:56 AM7/15/05
to
Rob wrote:

Hi,

If the computers are in an Active Directory domain:

You can do it in a computer startup script (with a GPO) that runs as
part of the boot up process (before the user logs in). It runs under
the system context and has admin rights.

The VBScript below will only delete the values once even if the script
is run multiple times, by setting a registry marker.


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


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp


FYI:

Please post WSUS questions to the new newsgroup
microsoft.public.windows.server.update_services


WebNews link to the WSUS newsgroup:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.windows.server.update_services


Or use a newsgroup reader (default Outlook Express) to access this new
group:

Clicking on this link should open this group in OE:

news://msnews.microsoft.com/microsoft.public.windows.server.update_services

--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Rob

unread,
Jul 16, 2005, 6:24:01 PM7/16/05
to
Excellent, I deployed it this morning and it is working great! You're a life
saver!!!!
--
Rob J
Reply all
Reply to author
Forward
0 new messages