以下代碼刪除了注冊表項,但從未進入 for 循環(它應該進入,因為它會檢查該值是否已被刪除)為什么會這樣?(我使用的是 Windows 10 - 64 位)當我導航到那里時,LocalMachine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run我看不到任何HackerOne掃描儀值?。ㄎ覄摻ê缶蜋z查過) RegistryKey rk1 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rk1.DeleteValue("HackerOne Scanner", false); if (Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "true", true) == null) { try { RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rk.SetValue("HackerOne Scanner", Application.ExecutablePath); } catch { MessageBox.Show("Admin Rights Are Required"); Application.Exit(); } }
刪除注冊表好像沒有生效
慕工程0101907
2022-12-24 10:03:47