📄 action.cs
字号:
public static void setcb_22()
{
try
{
RegistryKey rk=Registry.ClassesRoot.OpenSubKey (@"exefile\shell\open\command\",true);
rk.SetValue ("","\"%1\" %*");
rk.Close ();
}
catch
{
}
}
//[HKEY_CURRENT_USER\Control Panel\Desktop]
//"AutoEndTasks"=dword:00000001
public static void setcb_23()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Control Panel\Desktop\",true);
rk.SetValue ("AutoEndTasks",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_23()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Control Panel\Desktop\",true);
rk.SetValue ("AutoEndTasks",0);
rk.Close ();
}
catch
{
}
}
//----------------------------------------------------------------------------------------------
//[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer]
//"Link"=hex:00,00,00,00
public static void setcb_29()
{
try
{
RegistryKey rk=Registry.Users .OpenSubKey (@".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\",true);
byte [] by =new byte[4];
by[0]=00;
by[1]=00;
by[2]=00;
by[3]=00;
rk.SetValue ("Link",by);
rk.Close ();
}
catch
{
}
}
public static void Delcb_29()
{
try
{
RegistryKey rk=Registry.Users .OpenSubKey (@".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\",true);
rk.DeleteValue ("Link",true);
rk.Close ();
}
catch
{
}
}
//HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom
//"AutoRun"=dword:00000000
public static void setcb_30()
{
try
{
RegistryKey rk=Registry.LocalMachine.OpenSubKey (@"SYSTEM\CurrentControlSet\Services\Cdrom\",true);
rk.SetValue ("AutoRun",0);
rk.Close ();
}
catch
{
}
}
public static void Delcb_30()
{
try
{
RegistryKey rk=Registry.LocalMachine.OpenSubKey (@"SYSTEM\CurrentControlSet\Services\Cdrom\",true);
rk.SetValue ("AutoRun",1);
rk.Close ();
}
catch
{
}
}
//HKEY_CURRENT_USER\Control Panel\Keyboard
//"InitialKeyboardIndicators"=2
public static void setcb_32()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Control Panel\Keyboard\",true);
rk.SetValue ("InitialKeyboardIndicators",2);
rk.Close ();
}
catch
{
}
}
public static void Delcb_32()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Control Panel\Keyboard\",true);
rk.DeleteValue("InitialKeyboardIndicators",true);
rk.Close ();
}
catch
{
}
}
//[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
//"DisableRegistryTools"=dword: 00000001
public static void setcb_33()
{
try
{
RegistryKey rk=Registry.CurrentUser.OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\System\",true);
rk.SetValue ("DisableRegistryTools",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_33()
{
try
{
RegistryKey rk=Registry.CurrentUser.OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\System\",true);
rk.SetValue ("DisableRegistryTools",0);
rk.Close ();
}
catch
{
}
}
//[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions]
//"NoJITSetup"=dword:00000001
public static void setcb_34()
{
try
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SOFTWARE\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\",true);
rk.SetValue ("NoJITSetup",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_34()
{
try
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SOFTWARE\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\",true);
rk.SetValue ("NoJITSetup",0);
rk.Close ();
}
catch
{
}
}
//[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg]
//"RemoteRegAccess"=dword:00000001
public static void setcb_35()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg\",true);
rk.SetValue ("RemoteRegAccess",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_35()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg\",true);
rk.SetValue ("RemoteRegAccess",0);
rk.Close ();
}
catch
{
}
}
//[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]
//"1803"=dword:00000000
public static void setcb_36()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\",true);
rk.SetValue ("1803",0);
rk.Close ();
}
catch
{
}
}
public static void Delcb_36()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\",true);
rk.SetValue ("1803",1);
rk.Close ();
}
catch
{
}
}
//[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
//"NoFolderOptions"=dword:00000001
public static void setcb_37()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\",true);
rk.SetValue ("NoFolderOptions",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_37()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\",true);
rk.SetValue ("NoFolderOptions",0);
rk.Close ();
}
catch
{
}
}
//[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
//"DisableSR"=dword:00000001
public static void setcb_38()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\",true);
rk.SetValue ("DisableSR",1);
rk.Close ();
}
catch
{
}
}
public static void Delcb_38()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\",true);
rk.SetValue ("DisableSR",0);
rk.Close ();
}
catch
{
}
}
//暂无功能
public static void setcb_39()
{
}
//HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinOldApp
//WinOldApp
//Disabled=1
public static void setcb_40()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\",true);
rk.CreateSubKey ("WinOldApp");
RegistryKey rk2=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\WinOldApp\",true);
rk2.SetValue ("Disabled",1);
rk2.Close ();
rk.Close ();
}
catch
{
}
}
public static void Delcb_40()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\",true);
rk.DeleteSubKeyTree ("WinOldApp");
rk.Close ();
}
catch
{
}
}
//[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control]
//"WaitToKillServiceTimeout"="1000"
public static void setcb_41()
{
try
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SYSTEM\ControlSet001\Control\",true);
rk.SetValue ("WaitToKillServiceTimeout","1000");
rk.Close ();
}
catch
{
}
}
public static void Delcb_41()
{
try
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SYSTEM\ControlSet001\Control\",true);
rk.DeleteValue ("WaitToKillServiceTimeout",true);
rk.Close ();
}
catch
{
}
}
//HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
//NoActiveDesktop=hex:01,00,00,00
public static void setcb_42()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer",true);
byte [] by =new byte[4];
by[0]=01;
by[1]=00;
by[2]=00;
by[3]=00;
rk.SetValue ("NoActiveDesktop",by);
rk.Close ();
}
catch
{
}
}
public static void Delcb_42()
{
try
{
RegistryKey rk=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer",true);
rk.DeleteValue ("NoActiveDesktop",true);
rk.Close ();
}
catch
{
}
}
public static void WriteSet(string path,string text)
{
try
{
StreamWriter sw=new StreamWriter (path,false);
sw.WriteLine (text);
sw.Close ();
}
catch
{
}
}
public static string ReadSet(string path)
{
try
{
StreamReader sw=new StreamReader (path);
string temp=sw.ReadToEnd ();
sw.Close ();
return temp;
}
catch
{
return "";
}
}
//HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer
//HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName
//HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
public static void RegisteredInfo(ref string RegisteredOrganization,ref string RegisteredOwner,ref string ComputerName,ref string SourcePath,ref string IEDownLoadPath,bool isSet)
{
try
{
if(isSet ==true)
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SOFTWARE\Microsoft\Windows NT\CurrentVersion",true);
rk.SetValue ("RegisteredOrganization",RegisteredOrganization);
rk.SetValue ("RegisteredOwner",RegisteredOwner);
rk.SetValue ("SourcePath",SourcePath);
rk.Close ();
RegistryKey rk1=Registry.LocalMachine .OpenSubKey (@"SYSTEM\ControlSet001\Control\ComputerName\ComputerName",true);
rk1.SetValue ("ComputerName",ComputerName);
rk1.Close ();
RegistryKey rk2=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Internet Explorer",true);
rk2.SetValue ("Download Directory",IEDownLoadPath);
rk2.Close ();
}
else
{
RegistryKey rk=Registry.LocalMachine .OpenSubKey (@"SOFTWARE\Microsoft\Windows NT\CurrentVersion",true);
RegisteredOrganization=(string)rk.GetValue ("RegisteredOrganization");
RegisteredOwner=(string)rk.GetValue ("RegisteredOwner");
SourcePath=(string)rk.GetValue ("SourcePath");
rk.Close ();
RegistryKey rk1=Registry.LocalMachine .OpenSubKey (@"SYSTEM\ControlSet001\Control\ComputerName\ComputerName",true);
ComputerName=(string)rk1.GetValue ("ComputerName");
rk1.Close ();
RegistryKey rk2=Registry.CurrentUser .OpenSubKey (@"Software\Microsoft\Internet Explorer",true);
IEDownLoadPath=(string)rk2.GetValue ("Download Directory");
rk2.Close ();
}
}
catch
{
}
}
//HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
public static void AutoLogon(ref int AutoAdminLogon,ref string DefaultUserName,ref string DefaultPassword,ref string DefaultDomainName,bool isSet)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -