Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to Registry, pls HELP 1

Status
Not open for further replies.

kensheehimura1

Programmer
Jun 2, 2003
19
PH
how can i write this in the registry using visual basic--"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" with the name of "MyProgram", with the type REG_SZ with the value of "c:\Myprogram.exe", my purpose is to run it during startup, with putting a shortcut in the startup folder. tnx.
 
Dim Reg As Object
Set Reg = CreateObject("Wscript.Shell")
Reg.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"


AIM: survivertiger & Ye This Is Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top