该程序主要针对的操作系统有
Microsoft Windows XP Professional
Microsoft Windows XP Home Edition
Microsoft Windows 2000 Professional
Microsoft Windows 2000 Server
Microsoft Windows 2000 Advanced Server
Microsoft(R) Windows(R) Server 2003
程序自己编写,并已经经过测试,请放心使用,呵呵
'本程序由某某电科院信息研究所编制,如有改动和引用表明引用出处。
'希望给你带来工作上的便利。 作者:bubble4629
On Error Resume Next
dim a '此处为判断计算机操作系统变量
dim path1
path1="c:/ms08067/windowsxp.exe /q /z"
dim path2
path2="c:/ms08067/windows2000.exe /q /z"
dim path3
path3="c:/ms08067/windows2003.exe /q /z"
set wshshell=CreateObject("wscript.shell")
set fso=wscript.createobject("scripting.filesystemobject")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!//" & strComputer & "/root/cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
a=objOperatingSystem.Caption
'Wscript.echo a
select case a
case "Microsoft Windows XP Professional"
msgbox("XP系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path1)
wscript.sleep 50000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case "Microsoft Windows 2000 Professional"
msgbox("2000系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path2)
wscript.sleep 50000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case "Microsoft Windows XP Home Edition"
msgbox("xp系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path1)
wscript.sleep 50000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case "Microsoft Windows 2000 Advanced Server"
msgbox("2000系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path2)
wscript.sleep 50000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case "Microsoft Windows 2000 Server"
msgbox("2000系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path2)
wscript.sleep 5000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case "Microsoft(R) Windows(R) Server 2003"
msgbox("2003系统点击确定开始安全MS08-067补丁")
set oexec=wshshell.exec(path3)
wscript.sleep 5000
fso.deletefile "c:/ms08067.vbs"
fso.deletefolder("c:/ms08067")
fso.close
set WshShell=nothing
Wscript.quit
case else
msgbox("不能识别,程序终止")
wscript.quit
end select
Next