Link to home
Start Free TrialLog in
Avatar of MrTJaume
MrTJaumeFlag for Canada

asked on

How do I script a conditional change to the Registry?

Hello,

We recently imaged a number of Windows XP Professional computers that aren't showing up on the Windows Server Update Services (WSUS) console. What we need to do in a startup script is to check if the value in "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\SusClientId" is "d6fc2d8d-6276-4786-b571-9a435c6dcb14" and, if so, to run the code below.

Thanks in advance,

Thierry
net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
net start wuauserv
wuauclt /resetauthorization /detectnow

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of TheBuzzMan
TheBuzzMan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MrTJaume

ASKER

Works great! - Thanks TheBuzzMan