Link to home
Start Free TrialLog in
Avatar of dbguy2626
dbguy2626

asked on

Add String Value To Run Folder In Registry

Guys, I know this is easy but I need some help.  Just a simple script that would add a string Value to the Registrys Run Key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\

Please help
Avatar of modell100699
modell100699
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of dbguy2626
dbguy2626

ASKER

I was hoping to do it in VB and not import.. Here is what I have, any thoughts why it is not working


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "C:\test.exe", "REG_SZ"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial