Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Create String and DWORD ValuesContent of Create String and DWORD Values.vbsMD5 Hash: 8200E1B434BCDB5B6F903D8B564290C0 |
||
' Description: Uses WMI to create string and DWORD values under the HKLM\SOFTWARE\System Admin Scripting Guide portion of the registry.
Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\System Admin Scripting Guide" strValueName = "String Value Name" strValue = "string value" oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strValueName = "DWORD Value Name" dwValue = 82 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |