Monday, May 31, 2010

Editing Registry Entries with VBS

Editing Registry Entries with VBS is simple. Here is some code to do just that:



Const HKEY_LOCAL_MACHINE = &H80000002 
on error resume next


strComputer = "LOCALHOST"


    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
   strComputer & "\root\default:StdRegProv")
   strKeyPath = "SOFTWARE\Bentley\Licensing\1.1"
   strEntryName = "Country"
   strValue = "Afghanistan"
   objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, strValue








WScript.Quit 

No comments:

Post a Comment

Generating "Always On Top" NSWindow in macOS across all detected displays

Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift  Langues, you m...