China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 23:50
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] A question about run in VBS View 1,007 Replies 4
Original Poster Posted 2010-09-03 10:41 ·  中国 上海 漕河泾科技网IDC机房
新手上路
Credits 3
Posts 3
Joined 2010-09-02 12:01
15-year member
UID 173451
Gender Male
Status Offline
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.
Floor 2 Posted 2010-09-03 13:05 ·  中国 北京 263网络通信电信数据中心
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
run also has parameters... wait mode
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 3 Posted 2010-09-03 15:04 ·  中国 上海 中国科学院上海分院
新手上路
Credits 3
Posts 3
Joined 2010-09-02 12:01
15-year member
UID 173451
Gender Male
Status Offline
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.
Floor 4 Posted 2010-09-03 15:20 ·  中国 上海 中国科学院上海分院
新手上路
Credits 3
Posts 3
Joined 2010-09-02 12:01
15-year member
UID 173451
Gender Male
Status Offline
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
Floor 5 Posted 2010-09-05 03:09 ·  中国 广东 中山 电信
初级用户
Credits 102
Posts 47
Joined 2008-11-10 08:29
17-year member
UID 130514
Gender Male
Status Offline
Besides wait, you can also watch the process, or read the registry to verify whether the uninstall is complete/successful.
Forum Jump: