另外想到有两个题没人回答那我答一下吧,呵.
1,是为什么用START就可以自动的关闭CMD窗口.
2,是为什么一定要用start "
AcroRd32.exe的标题" "D:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"才能执行.
第一个是因为,如果是内部的CMD命令,或是批文件的化默认是以
CMD /K来运行的,/K也是就是运行程序并保持窗口.
第二个是因为,加了引号的路径被认成了是标题的字符串了,所以不就是没有路径了,也就出错了.要是你写成了,
start "D:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" AA
那就会提示你文件AA找不到呀.
Last edited by hxuan999 on 2006-12-29 at 07:53 PM ]
Also, I just thought of two questions that no one answered, so I'll answer them, heh.
1, Why can using START automatically close the CMD window.
2, Why must use start "
Title of AcroRd32.exe" "D:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" to execute.
The first is because, if it's an internal CMD command or a batch file, by default it runs with
CMD /K, and /K means run the program and keep the window.
The second is because, the path in quotes is recognized as the title string, so there's no path, and thus an error occurs. If you write it as,
start "D:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" AA
then it will prompt you that file AA is not found.
Last edited by hxuan999 on 2006-12-29 at 07:53 PM ]