Pages

Wednesday, 28 January 2009

Adding Registries using VBScript

Option Explicit
const HKEY_LOCAL_MACHINE = &H80000002
const HKEY_CLASSES_ROOT = &H80000000


Dim objReg, Return
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"& "\root\default:StdRegProv")


Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}","","_IMsoDispObj")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}\ProxyStubClsid")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}\ProxyStubClsid","","{00020424-0000-0000-C000-000000000046}")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{4EF6100A-AF88-11D0-9846-00C04FC29993}\ProxyStubClsid32")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}\ProxyStubClsid32","","{00020424-0000-0000-C000-000000000046}")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{4EF6100A-AF88-11D0-9846-00C04FC29993}\TypeLib")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}\TypeLib","","{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{000C0300-0000-0000-C000-000000000046}\TypeLib","Version","2.3")




Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}","","IAccessible")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\NumMethods")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\NumMethods","","28")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\ProxyStubClsid")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\ProxyStubClsid","","{00020424-0000-0000-C000-000000000046}")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\ProxyStubClsid32")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\ProxyStubClsid32","","{00020424-0000-0000-C000-000000000046}")
Return = objReg.CreateKey(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\TypeLib")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\TypeLib","","{1EA4DBF0-3C3B-11CF-810C-00AA00389B71}")
Return = objReg.SetStringValue(HKEY_CLASSES_ROOT,"Interface\{618736E0-3C3D-11CF-810C-00AA00389B71}\TypeLib","Version","1.1")




Set objReg = Nothing

No comments:

Post a Comment