Automating Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
General Function - Registry WriteThis function writes a value to the Registry Download it Here (right-click and then save target as). (NOTE - you can just cut & paste from below, but the formatting will have multiple spaces instead of tabs).
'=========================================================================
Sub zGen_RegistryWrite(sKey, sValue) 'Write a value to the Registry 'Usage: 'Call zGen_RegistryWrite(sKey, sValue) 'Where: 'sKey = The root and path of the key required 'sValue = The value to write to the key Dim oShell Set oShell = CreateObject("WScript.Shell") oShell.RegWrite sKey, sValue, "REG_SZ" Set oShell = Nothing End Sub '========================================================================= |