execcmd.exe tcl
我一直在查找有关exec cmd.exe的信息,但找不到任何有用的信息。有人能给我解释一下下面的代码吗execcmd.exe tcl,tcl,Tcl,我一直在查找有关exec cmd.exe的信息,但找不到任何有用的信息。有人能给我解释一下下面的代码吗 exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup 让我们把它分解一下: exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup #^^^ 该命令启动一个子进程 exec cmd.exe /c start /wait
exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup
让我们把它分解一下:
exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup
#^^^
该命令启动一个子进程
exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup
# ^^^^^^^^^^
是windows“批处理”shell,/c
标志要求它作为命令运行其参数
exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup
# ^^^^^^^^^^^
该命令内置于cmd.exe
中,也是启动另一个程序的一种方式。/wait
标志告诉它等待启动的程序结束
exec cmd.exe /c start /wait $buildLoc\\setup.exe /extract_all:C:/setup
# ^^^^^^^^^
一个正则TCL变量;它将在TCL内部扩展
剩下的就是setup.exe程序所做的一切(谁知道呢…)
如果不知道这里运行的程序的更多信息(见下文),就很难说清楚为什么需要中间exec.cmd/c start/wait
;我猜cmd.exe将加载系统的所有默认环境(而不是使用从tcl程序继承的环境),而start
将打开一个终端窗口,以便向用户显示setup.exe程序的输出。签出
exec {*}[auto_execok start] /wait $buildLoc\\setup.exe /extract_all:C:\\setup