zoukankan      html  css  js  c++  java
  • 禁止使用任务管理器

    实现效果:

      

    知识运用:

      Registry类的SetValue方法

      public static void SetValue (string keyName, string valueName, Object value)

    实现代码:

            private void button1_Click(object sender, EventArgs e)
            {
                Registry.SetValue(@"HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem","DisableTaskMgr",1);
                Registry.SetValue(@"HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem", "DisableTaskMgr", 1);
                MessageBox.Show("已成功禁止Windows任务管理器");
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                Registry.SetValue(@"HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem", "DisableTaskMgr", 0);
                Registry.SetValue(@"HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem", "DisableTaskMgr", 0);
                MessageBox.Show("已成功开启Windows任务管理器");
            }
    

      

  • 相关阅读:
    蟠桃记
    考新郎
    有假币
    年会抽奖
    发邮件
    进制回文数
    数位和
    外星人的语言
    一的个数
    继承
  • 原文地址:https://www.cnblogs.com/feiyucha/p/10306463.html
Copyright © 2011-2022 走看看