Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWAREMicrosoftWindowsCurrentVersionRun", true); string str = Assembly.GetExecutingAssembly().Location; key.SetValue("Camaleone", str);