中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 03:21
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » [Help] A question about run in VBS
Printable Version  1,010 / 4
Floor1 charmingjeff Posted 2010-09-03 10:41
新手上路 Posts 3 Credits 3
set ws=wscript.createobject("wscript.shell")
ws.run "msiexec /x {AC76BA86-7AD7-2052-7B44-A81000000003}" 'Uninstall Adobe Reader 8.1.0 - Chinese Simplified'
ws.run "msiexec /x {260706D6-56D3-41E8-9183-DC4DF54B7F4B}" 'Uninstall Tencent TM2009'

Right now after this script runs, the 2 uninstallers run at the same time. I want it to execute the second one only after the first one finishes. Is there any way to do that? Please advise.
Floor2 slore Posted 2010-09-03 13:05
铂金会员 Posts 2,478 Credits 5,212
run also has parameters... wait mode
Floor3 charmingjeff Posted 2010-09-03 15:04
新手上路 Posts 3 Credits 3
Originally posted by slore at 2010-9-3 13:05:
run also has parameters... wait mode


Could you be a bit more specific? I'm still not very familiar with scripting, thanks.
Floor4 charmingjeff Posted 2010-09-03 15:20
新手上路 Posts 3 Credits 3
Originally posted by charmingjeff at 2010-9-3 15:04:


Could you be a bit more specific? I'm still not very familiar with scripting, thanks.


Is it correct written like this? From testing, it seems fine.
set ws=wscript.createobject("wscript.shell")
ireturn=ws.run("msiexec /norestart /x {AC76BA86-7AD7-2052-7B44-A81000000003}",1,true) 'Uninstall Adobe Reader 8.1.0 - Chinese Simplified'
ireturn=ws.run("msiexec /norestart /x {260706D6-56D3-41E8-9183-DC4DF54B7F4B}",1,true) 'Uninstall Tencent TM2009'
wscript.quit
Floor5 azziporah Posted 2010-09-05 03:09
初级用户 Posts 47 Credits 102
Besides wait, you can also watch the process, or read the registry to verify whether the uninstall is complete/successful.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023