Saturday, September 29, 2007

VBScript to add entry in a Registry path

'Script start

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "MyNetworkComputername"Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")strKeyPath = "Softwares\Microsoft\Windows\Currentversion\Run"
strValueName = "StartMyProgram"
strVal="myprogram.exe"
oReg.SetstringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strVal

'Script End

Queries on customization. Open http://orangescripts.blogspot.com/ and post it .

2 comments:

Anonymous said...

Instead of criticising write the variants is better.

Anonymous said...

It is a pity, that now I can not express - I hurry up on job. But I will be released - I will necessarily write that I think.