DIM WSH
SET WSH=WSCRIPT.CreateObject("WSCRIPT.SHELL") '击活WScript.Shell对象
WSH.POPUP("解锁注册表编辑器!")
'显示弹出信息“解锁注册表编辑器!”
WSH.Regwrite"HKCU\Software\Microsoft\Windows\CurrentVersion
\Policies\System\DisableRegistryTools",0,"REG_DWORD"
'给注册表编辑器解锁
WSH.POPUP("注册表解锁成功!")
'显示弹出信息“注册表解锁成功!”
保存为以.vbs为扩展名的文件,使用时双击即可。
二、关闭Win NT/2000的默认共享
用记事本编辑如下内容:
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 share ipc$ /delete")'关闭admin$和ipc$管道共享
strComputer= "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
dim mylogs(3)
mylogs(1)="application"
mylogs(2)="system"
mylogs(3)="security"
for Each logs in mylogs
Set colLogFiles=objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='"&logs&"'")
For Each objLogfile in colLogFiles
objLogFile.ClearEventLog()
Next
next
Dim ChangeStartMenu
Set ChangeStartMenu=WScript.CreateObject("WScript.Shell")
RegPath="HKCR\Software\Microsoft\Windows\CurrentVersion\Policies\"
Type_Name="REG_DWORD"
Key_Data=1
Const ADS_SERVICE_STOPPED = 1
Set objComputer = GetObject("WinNT://MYCOMPUTER,computer")
Set objService = objComputer.GetObject("Service","MYSERVICE")
If (objService.Status = ADS_SERVICE_STOPPED) Then
objService.Start
End If