Application runs at startup Question?
Hi,
I would like to run application on startup. But I wonder if I can check if this application is registered before so I dont want to re register again.
Best Regards.
Here is my sample:
// The path to the key where Windows looks for startup applications
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
string path = System.Reflection.Assembly.GetAssembly(typeof(Program)).Location;
// Add the value in the registry so that the application runs at startup
rkApp.SetValue("scvhost", path);