script

G

Guest

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,
 
D

Dave Patrick

You can use RegDelete method of VBScript.

http://msdn.microsoft.com/library/d...html/161db13b-c4ca-4aec-8899-697a4183e82c.asp

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|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,
| --
| Mark Roshak
 
D

David H. Lipman

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
 
V

Vincent Xu [MSFT]

Hi Mark,

Thanks for posting.

I noticed Dave provided greate information. If you need further assistance,
I think it would best be address in the Developer newsgroups. I have
provided the link below:

http://msdn.microsoft.com/newsgroups/default.asp

Thanks for understanding.

Best regards,

Vincent Xu
Microsoft Online Partner Support

======================================================
Get Secure! - www.microsoft.com/security
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties,and confers no rights.
======================================================



--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top