欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

重新安装ie的一个vbs

程序员文章站 2022-04-10 08:07:21
复制代码 代码如下:'run_ie_reinstall.vbs - runs the internet explorer setup '?doug knox - 4/10/...
复制代码 代码如下:

'run_ie_reinstall.vbs - runs the internet explorer setup
'?doug knox - 4/10/2002
'downloaded from www.dougknox.com

x = msgbox("do you want to reinstall internet explorer?", vbyesno, "prompt!")

y = msgbox("do you want to reinstall outlook express?", vbyesno, "prompt!")

set wshshell = wscript.createobject("wscript.shell")

if x = 6 then
wshshell.regwrite "hklm\software\microsoft\active setup\installed components\{89820200-ecbd-11cf-8b85-00aa005b4383}\isinstalled", 0, "reg_dword"
end if

if y = 6 then
wshshell.regwrite "hklm\software\microsoft\active setup\installed components\{44bba840-cc51-11cf-aafa-00aa00b6015c}\isinstalled", 0, "reg_dword"
end if

if x = 6 or y = 6 then
wshshell.run ("rundll32.exe setupapi,installhinfsection defaultinstall 132 %windir%\inf\ie.inf")
else
msgbox "you chose not to reinstall ie or oe. no changes were made." & vbcr & vbcr & "copyright 2003 - doug knox",vbokonly, "user cancelled"
end if