tags:

views:

25

answers:

1

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 inside Z:\draft\ and not C:\nsis\? Because, it can't rename the directory otherwise.

Thanks.

+1  A: 

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.

Brian R. Bondy
Great! `SetOuPath` done the job. Next time, I'll read carefully the manual :)
Anonymous
@moz: No problem it's a little non intuitive, either you know it or you don't :)
Brian R. Bondy