Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass parameter through "Run-->Parameters" in Inno Setup?

I worked with passing command line parameters through Command prompt. (/d<name>=<value>). It's work.

Later I found "parameters" option in "Run" menu of "Inno Setup 5". I tried but failed to pass. My Attempts

"/dWish=Hello"

/dWish=Hello

"Wish=Hello"

Wish="Hello"

Wish="Hello"

Wish=Hello

And access like {#Wish}. But compilation filed with error undeclared identifier "Wish"

This is for option enter image description here

like image 200
Satish Avatar asked Jan 29 '15 13:01

Satish


1 Answers

Settings configured via Run -> Parameters are used to pass instructions to the installer being executed after compilation, not the build compiler (ISCC). Options that may be set are available in the InnoSetup help under Setup Command Line Parameters.

To pass parameters to the compiler itself, run the compiler from the command-line, and use the /D switch. So to set variable VAR to value val, use:

iscc "/dVAR=val" "MyInstallerScript.iss"

The ISCC.exe program is located in:

%programfiles%\Inno Setup 5\ISCC.exe

like image 78
CJBS Avatar answered Oct 29 '22 07:10

CJBS