I have developed a WPF application, now I have to launch the application on windows startup.
To do this, I have written the below code. I got the solution from this answer.
It is adding the key in registry but not launching the application.
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
string str = Assembly.GetExecutingAssembly().Location;
key.SetValue("Camaleone", str);