Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch/CMD: Adding files to Startup list

How can a batch file lists itself in the startup list of Windows???

It doesn't matter if it goes from the registry or not.

IF with the registry, please give also the command to DELETE the registry entry.

This should work under all versions from ME to 7 please.

Otherwise just XP/Vista/7.

Thanks.

like image 971
Deniz Zoeteman Avatar asked Jul 20 '09 16:07

Deniz Zoeteman


1 Answers

Not sure i understand you, but if what you want is an easy way to execute a command/batch on startup, why not just put it in the All Users\Startup folder?
To do so programatically would just mean copying a file to that directory.
For example, in Windows Vista, the full path of that directory is:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

(you can use replace the beginning of the line with %ProgramData% or %AllUsers%\ProgramData to make it more global - such as when Windows is installed on D:).

like image 150
Traveling Tech Guy Avatar answered Sep 30 '22 17:09

Traveling Tech Guy