开发者

"Exec" into specific folder

From an NSIS script (located at C:\nsis\ for example), I execute an external program (let's say something.bat) with some paramerters:

Exec '"Z:\draft\something.bat" $param1 $param2'

something.bat is suppoed to rename the directory C:\nsis. My question is, how can I tell Exec to launch something.bat insi开发者_C百科de Z:\draft\ and not C:\nsis\? Because, it can't rename the directory otherwise.

Thanks.


You can use SetOutPath to set the current working directory. I think that should do what you want.

In the NSIS documentation you can also see that it uses the variable that SetOutPath sets (which is $OUTDIR) for Exec statements.

4.9.1.2 Exec

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜