Untitled
unknown
plain_text
2 years ago
2.4 kB
23
Indexable
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace GAME.SHELL
{
public static class Regedit
{
public static void DisableCtrlAltDelete()
{
RegistryKey regkey;
string keyValueInt = "1";
string subKey = @"Software\Microsoft\Windows\CurrentVersion\Policies\System";
try
{
regkey = Registry.CurrentUser.CreateSubKey(subKey);
regkey.SetValue("DisableTaskMgr", keyValueInt);
regkey.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
public static void EnabledCtrlAltDelete()
{
try
{
string subKey = @"Software\Microsoft\Windows\CurrentVersion\Policies\System";
RegistryKey rk = Registry.CurrentUser;
RegistryKey sk1 = rk.OpenSubKey(subKey);
if (sk1 != null)
rk.DeleteSubKeyTree(subKey);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
public static void DisableWin()
{
RegistryKey regkey;
string keyValueInt = "1";
string subKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
try
{
regkey = Registry.CurrentUser.CreateSubKey(subKey);
regkey.SetValue("NoWinKeys", keyValueInt);
regkey.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
public static void EnabledWin()
{
try
{
string subKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
RegistryKey rk = Registry.CurrentUser;
RegistryKey sk1 = rk.OpenSubKey(subKey);
if (sk1 != null)
sk1.DeleteValue("NoWinKeys");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
}
Editor is loading...