I have a solution with two project files in it. One executable is a windows form application and the other one is a console application. Both executables perform different tasks, however, both need to be run at the same time (only the windows form has to be started). Therefore I added following code to my windows form application:
RegistryKey rkApp =
Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
true);
public Form1()
{
if (rkApp.GetValue("somename") == null)
{
rkApp.SetValue("somename", Application.ExecutablePath.ToString());
}
When I now restart the PC, everything's gone... Any ideas why this problem is turning up? Thank you!
P.S.: I'm a complete beginner, please be nice :)