Run application on startup in Windows 8 C#
This code: RegistryKey rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rKey.DeleteValue(Application.ProductName, false); rKey.SetValue(Application.ProductName, Application.ExecutablePath, RegistryValueKind.String); doesn't work on Windows 8. I don't have idea why because on Windows 7 and on Windows XP this solution works. Can you help me? In order to set something in the registry you need to run the application as an administrator. To do so you first add a Application Manifest File to the Properties "folder" in the project. Then you change