' Sub : RegistryWrite
' desc : Writes a key value to the registry
' params : strRoot is the root key, i.e. "HKLM", "HKCU"
' strPath is the path to create, i.e.
' "Software\Test\Automation"
' strValue is the value to write in the key
' returns : void
' =============================================================
Function RegistryWrite(strRoot, strPath, strValue)
' create the shell object
Set objShell = CreateObject("WScript.Shell")
' write the key
objShell.RegWrite strRoot & "\" & strPath, strValue, "REG_SZ"
' destroy the object
Set objShell = Nothing
End Function 'RegistryWrite
0 comments:
Post a Comment