Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

launch VBS script after PC startup

Tags:

vbscript

I want launch my simple VBS script after PC startup (Win XP). I don't want put this script in C:\Documents and Settings\%UserName%\Start Menu\Programs\Startup

I want do it in script, it is possible?

Script:<br>
Dim oShell<br>
Set oShell = WScript.CreateObject ("WScript.Shell")<br>
oShell.run "notepad.exe c:\text.txt"
like image 845
Honza Avatar asked Dec 04 '12 15:12

Honza


1 Answers

You will either have to put it in the Startup folder or run it from the registry.

For all users, use registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.

For the current user, use registry key HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

like image 171
aphoria Avatar answered Dec 11 '22 09:12

aphoria