Skip to content
⌘ NSIS Forum Archive

Variable file?

2 posts

fistos#

Variable file?

Hey,

We're currently using a bunch of .NSI to install multiple stuff but I keep getting tired of changing a ton of variables in each files everytime it's needed.

So I was wondering if I could have some kind of file (text file?) where I could declare a bunch of variables, then simply include it in my scripts and it would work.

Is that possible? If yes how? If no is there any other solution?

Thx
kichik#
You could create a header file filled with !defines and !include it in your script. For example, the header file, named definitions.nsh will contain:
!define NAME "my application"
!define MAIN_EXE application.exe
And your script will contain:
Name "${NAME}"
#...
File "${MAIN_EXE}"