Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows Server 2003 / Scripting / September 2007

Tip: Looking for answers? Try searching our database.

Script that will Add Registry Entry to HKLM\Softwares\Microsoft\Windows\Currentversion\Run

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
M P - 28 Sep 2007 04:16 GMT
I wanted to add an entry to the following registry path. Is it
possible?
Libor Kunčík - 28 Sep 2007 08:53 GMT
M P napsal(a):
> I wanted to add an entry to the following registry path. Is it
> possible?

Example vbscript:
'----------------------------------------
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
'----------------------------------------

Libor
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.