Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple vbscript to change a couple of registry key values

Status
Not open for further replies.

reedy1969

Technical User
Oct 18, 2012
1
US
Hi Guys

I need a VBscript that changes the below registry keys and gives them these values :

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"TargetGroupEnabled"=dword:00000001
"TargetGroup"="APLP - WSUS Phase 1"

being new to vb this is poor attempt .. really appreciate it if someone could put it right ?


Set WshShell = WScript.CreateObject ("WScript.SHell")
WshShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\" & "TargetGroupEnabled", 0, "REG_DWORD"
WshShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\" & "TargetGroup", APLP - Phase 2, "REG_SZ"

Many Thanks !
 
ASP vBscript is not allowed that level of access to the server.


Maybe forum329 is really where you should be asking.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top