startup

Started by
3 comments, last by DaBono 18 years, 10 months ago
How do I make a program add itself to the startup so it starts automatically when the computer is turn on?
-----------------------------Language: C++API: Win32, DirectXCompiler: VC++ 2003
Advertisement
Stick a shortcut to the item in \Start Menu\Programs\Startup .
Rob Loach [Website] [Projects] [Contact]
I already knew that, but some programs are in the startup without being in the startup menu
-----------------------------Language: C++API: Win32, DirectXCompiler: VC++ 2003
I assume we are talking about Windows.

There is a registry key:
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersion\Run

Under that key you create a string value with the path to your executable as "value".
The "name" of the string should be the name of you application. (Or something similarly descriptive)
The same registry key also exists under HKEY_CURRENT_USER (e.g. it only starts up for the installing user, not all users of the machine)...

BTW, I have no idea what you are planning to use this for (so maybe I miss your point, then just ignore me please), but I totally hate programs that use these keys. Why hide yourselve buried in the registry, instead of being in the start menu. Most of the time it's ad- or spyware that does this <yuck>.
Of course, if you have you're (honest) reasons, please use the registry key.

This topic is closed to new replies.

Advertisement