Friday, 3 August 2012

Append Binary value in Registry - VBScript




const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\Driver Signing"
strComputer = "."
iValues = Array(&H00,&H00,&H00,&H00)
Set oReg=GetObject( _ 
    "winmgmts:{impersonationLevel=impersonate}!\\" & _
   strComputer & "\root\default:StdRegProv")
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Driver Signing"
BinaryValueName = "Policy"


oReg.SetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,_
    BinaryValueName,iValues
Set oReg = Nothing

No comments:

Post a Comment