打开或关闭CMD:
- Dim WSHShell, r, m, v, t, g
- Dim i
- On Error Resume Next
- Set WSHShell=WScript.CreateObject("WScript.Shell")
- v="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\system\DisableCMD"
- i="REG_DWORD"
- t="命令提示窗口开关"
- r=WSHShell.RegRead(v)
- g=1
- If (r=1) Then g=0
- If g=1 Then
- WSHShell.RegWrite v,1,i
- m=MsgBox("是否限制命令提示窗口?",3,t)
- Else
- WSHShell.RegDelete v
- m=MsgBox("是否解除命令提示窗口限制?",3,t)
- End If
- 将以上内容复制到记事本中,将文件另存为*.VBS即可!
- 打开或关闭注册表:
- Dim WSHShell,r,M,v,t,g,i
- On Error Resume Next
- Set WSHShell=WScript.CreateObject("WScript.Shell")
- v="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
- i="REG_DWORD"
- t="注册表开关"
- r=WSHShell.RegRead(v)
- g=1
- If r=1 Then g=0
- If g=1 Then
- WSHShell.RegWrite v,1,i
- M=MsgBox("是否限制注册表编辑器?",4,t)
- Else
- WSHShell.RegDelete v
- M=MsgBox("是否解除注册表编辑器限制?",4,t)
- End If
- 也是将以上内容复制到记事本中,将文件另存为*.VBS即可!
- 打开或关闭任务管理器:
- Dim WSHShell, r, m, v, t, g
- Dim i
- On Error Resume Next
- Set WSHShell=WScript.CreateObject("WScript.Shell")
- v="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
- i="REG_DWORD"
- t="任务管理器开关"
- r=WSHShell.RegRead(v)
- g=1
- If (r=1) Then g=0
- If g=1 Then
- WSHShell.RegWrite v,1,i
- m=MsgBox("是否限制任务管理器?",3,t)
- Else
- WSHShell.RegDelete v
- m=MsgBox("是否解除任务管理器限制?",3,t)
- End If
也是将以上内容复制到记事本中,将文件另存为*.VBS即可!
希望大家能用上以上脚本!