Programmatically launch the application at login

What is the best way to programmatically launch a Windows login application? I know that you can do this by adding an item to the start folder in the Start menu, but I want to be able to disable and enable it in my application.

+5
source share
2 answers

Here is how you could do it in C #:

Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run",
          "MyStartUp",
          @"C:\StartUpApp.exe");

You basically need to add an entry to the registry. The above works at startup. There are a few more. I recommend downloading a tool like Autoruns to see all possible locations.

+10
source

Windows? "", "" "", ( Java) .

.

Yuval = 8 -)

+2

All Articles