Board logo

标题: [系统相关] call *.vbs可以暂停吗? [打印本页]

作者: cd309420    时间: 2008-11-4 17:00     标题: call *.vbs可以暂停吗?

@echo off
echo 第一步安装1.exe
call 1.exe
echo 第二步安装2.vbs
call 2.vbs
echo 第三步安装3.exe
call 3.exe
echo 第四步安装4.exe
call 4.exe
                            让它一步一步的弹出安装界面来。可是到了第二步,call 2.vbs就同第三步一起出来了。
   有什么方法解决吗?

[ 本帖最后由 cd309420 于 2008-11-4 17:02 编辑 ]
作者: cd309420    时间: 2008-11-4 17:03

在不用 pause  的情况下。
作者: Batcher    时间: 2008-11-4 17:37

C:\Test>start /?
Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [command/program]
      [parameters]

    "title"     Title to display in  window title bar.
    path        Starting directory
    B           Start application without creating a new window. The
                application has ^C handling ignored. Unless the application
                enables ^C processing, ^Break is the only way to interrupt
                the application
    I           The new environment will be the original environment passed
                to the cmd.exe and not the current environment.
    MIN         Start window minimized
    MAX         Start window maximized
    SEPARATE    Start 16-bit Windows program in separate memory space
    SHARED      Start 16-bit Windows program in shared memory space
    LOW         Start application in the IDLE priority class
    NORMAL      Start application in the NORMAL priority class
    HIGH        Start application in the HIGH priority class
    REALTIME    Start application in the REALTIME priority class
    ABOVENORMAL Start application in the ABOVENORMAL priority class
    BELOWNORMAL Start application in the BELOWNORMAL priority class
    WAIT        Start application and wait for it to terminate

作者: zqz0012005    时间: 2008-11-4 18:28

应该是你的vbs运行时间本来就短

用call调用外部程序其实与不加call效果一样(不考虑变量延迟等情况的话),相当于在bat的命令行上直接运行,也相当于start /wait 外部程序
作者: cd309420    时间: 2008-11-5 09:58

哦,我明白这个原理了。谢谢班主提醒。   我的VBS只是一个调用程序脚本,脚本执行完成自然就会执行第三步了。嘿嘿,谢谢老大。




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2