From: "roshak31" <
[email protected]>
| I have 50 windows 2000 sp4 machines. I've been told I need to Remove three
| values (SusClientId, AccountDomainSid, PingID) from the registry key:
| HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate
| I would like to do this using a startup script How would I go about doing
| this?
|
| Thanks,
I put it in the Domain Logon Script to run ONCE. This only needs to be executed once and
really only if thePCs have been cloned but I found no problems on PCs that were not cloned.
Basically the Windows Automatic Update Client will generate new hardware SIDs.
To force this you can execute; WUAUCLT /RESETAUTHORIZATION /DETECTNOW
I used KiXtart (
http://kixtart.org KiXtart is CareWare)
In the below, $Counter1 is a counter to set when the keys need to be deleted
The first time the function is executed, $Counter=1
the file; %windir%WSUSUpdate.1 won't exist and the keys are deleted.
The second time function is executed (the next Logon),
the file; %windir%WSUSUpdate.1 will exist and nothing is done
If the keys to need to be deleted again, for any reason, increment $Counter1
That is change...
$Counter1=1
to
$Counter1=2
Code Snippet:
$Counter1=1
FixWindowsUpdate()
;-------------------------------------------------------------------------
Function FixWindowsUpdate()
DIM $UpdateKeys, $R
if exist ("%windir%\WSUSUpdate.$Counter1")=0
$UpdateKeys="SusClientId", "AccountDomainSid", "PingID"
for each $key in $UpdateKeys
$R=DELVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate",$ke
y)
next
del "%windir%\WSUSUpdate.*"
shell '%comspec% /c ipconfig >"%windir%\WSUSUpdate.$Counter1" '
endif
endFunction
BTW: If you want help in scripting, next time you should ask in a scripting News Group such
as...
microsoft.public.windows.server.scripting