Skip to content
⌘ NSIS Forum Archive

autorun.inf and compile data files

5 posts

RussH#

autorun.inf and compile data files

I have my installer projects in separate directories and all is fine. I want to add automatically updating information in the autorun.inf file at compile time but can't find the source directory. Is there a variable that I am missing?

Russ...
kichik#
The source directory of the script is the current working directory, unless you pass /NOCD to the compiler. There's no variable that you're missing, it doesn't exist.
RussH#
So I try:

Push "autorun.inf"
Push "open=MDA-UDOP-Client"
Push "open=MDA-UDOP-Client-${VERSION}-Installer.exe"
Call ReplaceLineStr

But the file in the same directory as my nsi script is not updated. Is this because I've changed $OUTDIR in previous sections?

Russ...
kichik#
No, it's because that code is executed at runtime. If you want to execute code at build time, on your build machine, you must use !system or !execute.