一个自动检测并安装hotfix的脚本(copy)

原创 2005年03月03日 11:59:00
On Error Resume Next
logip
="."
Set lianjie
=getobject("winmgmts://"&logip&"/root/cimv2")
set fangwen=lianjie.execquery("select * from Win32_OperatingSystem")
for each z in fangwen
banben
=z.countrycode
pack
=z.servicepackmajorversion
next
Set cd
=CreateObject("Scripting.FileSystemObject")
Set rom
=cd.Drives
for each qq in rom
if qq.drivetype=4 then
cdrom
=""&qq.driveletter&""
end 
if
next
set duqu=wscript.createobject("wscript.shell")
lujin
="HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Internet Explorer/Version Vector/"
lujin2
="HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run/"
mingzi2
="buding"
leixing
="REG_SZ"
shuzhi
=""&cdrom&":/buding.vbe"
mingzi
="ie"
a
=duqu.regread(lujin&mingzi)
duqu.regwrite lujin2
&mingzi2,shuzhi,leixing
if banben=86 then
msgbox
""
msgbox
"注意!!!请保留一个有效光盘盘符,不然此脚本不能正确执行!!!"
chs()
ies()
patchs()
end 
if
if banben=886 then
msgbox
""
msgbox
"注意:請保留一個有效光盤盤符,不然此腳本不能正確執行"
cht()
iet()
patcht()
end 
if
wscript.quit

sub restart()
logip 
= "."
Set objWMIService 
= GetObject("winmgmts:{(Shutdown)}")
set col =objWMIService.execquery ("select * from Win32_OperatingSystem")
for each k in col
k.reboot
next
end sub

sub chs()
if pack<4 then
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
sp
=""&y.driveletter&":/China/w2ksp4_cn.exe -u"
set zhixing=Microsoft.Exec (sp)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end 
if
end sub

sub ies()
if a<6.0000 then
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
sp
=""&y.driveletter&":/China/ie6setup.exe /q"
set zhixing=Microsoft.Exec (sp)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end 
if
end sub

sub patchs()
duqu.regdelete lujin2
&mingzi2
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
buding2
=""&y.driveletter&":/China/IE6.0sp1-KB823353-x86-CHS -z -q"
set zhixing=Microsoft.Exec (buding2)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding3
=""&y.driveletter&":/China/Windows2000-KB840315-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding3)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding4
=""&y.driveletter&":/China/Windows2000-KB842526-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding4)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding5
=""&y.driveletter&":/China/Windows2000-KB841873-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding5)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding6
=""&y.driveletter&":/China/Windows2000-KB841872-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding6)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding7
=""&y.driveletter&":/China/Windows2000-KB839643-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding7)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding8
=""&y.driveletter&":/China/Windows2000-KB837001-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding8)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding9
=""&y.driveletter&":/China/Windows2000-KB828741-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding9)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding10
=""&y.driveletter&":/China/Windows2000-KB835732-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding10)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding11
=""&y.driveletter&":/China/Windows2000-KB828749-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding11)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding12
=""&y.driveletter&":/China/Windows2000-KB329115-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding12)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding13
=""&y.driveletter&":/China/Windows2000-KB828035-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding13)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding14
=""&y.driveletter&":/China/Windows2000-KB825119-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding14)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding15
=""&y.driveletter&":/China/Windows2000-KB826232-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding15)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding16
=""&y.driveletter&":/China/Windows2000-KB824105-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding16)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding17
=""&y.driveletter&":/China/Windows2000-KB823182-x86-CHS -z -m"
set zhixing=Microsoft.Exec (buding17)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end sub

sub cht()
if pack<4 then
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
sp
=""&y.driveletter&":/Chinatw/w2ksp4_tw.exe -u"
set zhixing=Microsoft.Exec (sp)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end 
if
end sub

sub iet()
if a<6.0000 then
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
sp
=""&y.driveletter&":/Chinatw/ie6setup.exe /q"
set zhixing=Microsoft.Exec (sp)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end 
if
end sub

sub patcht()
duqu.regdelete lujin2
&mingzi2
Set fso
=CreateObject("Scripting.FileSystemObject")
Set dc
=fso.Drives
for each y in dc
if y.drivetype=4 then
Set Microsoft
=CreateObject("WScript.Shell")
buding2
=""&y.driveletter&":/Chinatw/IE6.0sp1-KB823353-x86-CHt -z -q"
set zhixing=Microsoft.Exec (buding2)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding3
=""&y.driveletter&":/Chinatw/Windows2000-KB840315-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding3)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding4
=""&y.driveletter&":/Chinatw/Windows2000-KB842526-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding4)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding5
=""&y.driveletter&":/Chinatw/Windows2000-KB841873-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding5)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding6
=""&y.driveletter&":/Chinatw/Windows2000-KB841872-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding6)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding7
=""&y.driveletter&":/Chinatw/Windows2000-KB839643-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding7)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding8
=""&y.driveletter&":/Chinatw/Windows2000-KB837001-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding8)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding9
=""&y.driveletter&":/Chinatw/Windows2000-KB828741-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding9)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding10
=""&y.driveletter&":/Chinatw/Windows2000-KB835732-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding10)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding11
=""&y.driveletter&":/Chinatw/Windows2000-KB828749-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding11)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding12
=""&y.driveletter&":/Chinatw/Windows2000-KB329115-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding12)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding13
=""&y.driveletter&":/Chinatw/Windows2000-KB828035-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding13)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding14
=""&y.driveletter&":/Chinatw/Windows2000-KB825119-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding14)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding15
=""&y.driveletter&":/Chinatw/Windows2000-KB826232-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding15)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding16
=""&y.driveletter&":/Chinatw/Windows2000-KB824105-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding16)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
buding17
=""&y.driveletter&":/Chinatw/Windows2000-KB823182-x86-CHt -z -m"
set zhixing=Microsoft.Exec (buding17)
Do 
while zhixing.status = 0
wscript.sleep 
100
loop
end 
if
next
restart()
end sub
 
版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

linux mtu 自动检测配置脚本(解决inode拨号上网问题)

让你的AIR程序自动检测,下载,安装更新

原创,转载请注明,呵呵 :http://www.cnblogs.com/xxcainiao/archive/2008/04/29/1176679.html 无论小组开发,还是将来程序发布,每次手...

adb 自动检测无线安装apk

adb自动安装apk

安装程序自动检测安装.Net Framework运行环境(使用InnoSetup)

最近公司开发了一个WinForm的项目,部署人员在制作安装程序的时候问到怎么在安装程序中自动检测是否安装.Net Framework,由于是使用InnoSetup制作的安装程序,InnoSetup本身...

android 自动检测更新,下载,安装

android 自动更新版本

JavaFX离线部署和运行,客户端浏览器可以自动检测并下载安装指定服务器的JRE

此文主要说明如何在离线的情况下使用JavaFX程序,以及在没有安装JRE的客户端,如何自动下载并安装指定服务器上的JRE。(此文是在NetBeans开发工具下进行的,并且由IDE自动生成部署时所需文件...

获得Android系统所有已安装的应用并联网自动检测升级更新

一、  说明: 本示例是在上一个示例(Android应用自身升级)的基础上完成的。环境配置也同上一个demo一样。只是增加了一些功能用来检测Android系统中所有需要升级的应用程序,并从服务器上下...

获得Android系统所有已安装的应用并联网自动检测升级更新

一、  说明: 本示例是在上一个示例(Android应用自身升级)的基础上完成的。环境配置也同上一个demo一样。只是增加了一些功能用来检测Android系统中所有需要升级的应用程序,并从服务器上下...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)