how i can set my application to run at startup by the code ? :wave:
Printable View
how i can set my application to run at startup by the code ? :wave:
It's up to Windows what runs at startup and it is controlled by the Startup folder on the Start Menu and the Run keys in the registry. If you want your app to run at startup you need to either create a shortcut to it and put it in the user's, or the shared, Startup folder, or add an entry to the registry in the Run key for the machine or the user. The keys you want are HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run for all users and HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run for just the current user.
just a side note, look in the Microsoft.Win32 namespace.
the Registry and RegistryKey classes will be useful