Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing Winforms install to make application to start when windows starts

How do I force a windows application, with a setup project being added to it, to install so that it will start everytime someone logs into windows?

Edit: I'm aware of the registry settings, but specifically, I am looking for a solution which will allow for the installer to set the registry values.

like image 874
andrewWinn Avatar asked Dec 17 '22 05:12

andrewWinn


1 Answers

Open your registry and find the key

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run].

For each program you want to start automatically create a new string value using a descriptive name, and set the value of the string to the program executable.

For example, to automatically start Notepad, add a new entry of

"Notepad"="c:\windows\notepad.exe".

Remove a startup application If you're trying to remove a program and can not find it in the StartUp folder (usually C:\WINDOWS\Start Menu\Programs\StartUp), then it may be launching from one of the registry keys below. To remove it, delete the value associated with the program you want to remove.

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]

Source: http://www.pctools.com/guides/registry/detail/109/

like image 144
Chris Ballance Avatar answered Dec 19 '22 20:12

Chris Ballance