从一个 NSIS 脚本(例如位于 C:\nsis\
),我执行一个带有一些参数的外部程序(比方说 something.bat
):
Exec '"Z:\draft\something.bat" $param1 $param2'
something.bat
支持重命名目录C:\nsis
。我的问题是,如何告诉 Exec
在 Z:\draft\
而不是 C:\nsis 中启动
?因为,否则它无法重命名目录。something.bat
\
谢谢。
最佳答案
您可以使用 SetOutPath设置当前工作目录。我认为这应该可以满足您的需求。
在 NSIS 文档中,您还可以看到它使用 SetOutPath 为 Exec
语句设置的变量(即 $OUTDIR
)。
4.9.1.2 执行
Exec command
Execute the specified program and continue immediately. Note that the file specified must exist on the target system, not the compiling system. $OUTDIR is used for the working directory.
关于nsis - "Exec"进入特定文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2975519/