public void AddPathToRegistryTest() { string programName = "5nine Manager for Hyper-V"; string path = "c:\\"; Utilite.AddPathToRegistry(programName, path); }
private void TrySave5NinePathRemoveRun() { RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); // RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node", true); object o = key.GetValue(Constants.Five9RegName); // save run to regedeit if (o != null) { Utilite.AddPathToRegistry(Constants.Five9RegName, o.ToString()); key.DeleteValue(Constants.Five9RegName, true); key.Close(); } }