Raysefo

Raysefo

  • 1.1k
  • 284
  • 151.1k

Application runs at startup Question?

Jan 6 2012 9:50 AM
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);






Answers (1)