VB Script to Modify Registry Keys

3 04 2009

'Script adds or modifies existing values and paths to the windows registry.
'By Christopher Provolt

Const REG_SZ = "REG_SZ"
Const REG_DWORD = "REG_DWORD"
dim objShell

Set objShell = WScript.CreateObject("WScript.Shell")

UpdateRegKey "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\HttpPort", "50", REG_DWORD

Sub UpdateRegKey(strRegPath, strValue, strType)
objShell.RegWrite strRegPath, strValue, strType
End Sub

UpdateRegKey Function Input
'Registry Path,"Value","Type"

'DWORD values should be converted from DEC to HEX

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: