您的位置:首页 > 其它

任务管理器

2016-05-13 11:13 288 查看
/// <summary>

/// 管理任务管理器的方法
/// </summary>
/// <param name="arg">0:启用任务管理器 1:禁用任务管理器</param>
private void ManageTaskManager(int arg)
{
RegistryKey currentUser = Registry.CurrentUser;
RegistryKey system = currentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System",true );
//如果system项不存在就创建这个项
if (system == null)
{
system = currentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");
}
system.SetValue("DisableTaskmgr", arg, RegistryValueKind.DWord);
currentUser.Close();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: