How can I resolve the value of the installer command line parameter in Inno Setup Pascal Script?

I am trying to start the S2S pixel from the installer on a successful installation. A pixel requires some details, such as IP, location, time, and sub-id.

I got all the details except for the subdirectory that is indicated on the command line using the /subID=xxxx switch during installation.

+1
source share
1 answer

You can use {param:ParamName} pseudo- {param:ParamName} .

See also Can I accept custom command-line options using Inno Setup .

In Pascal Script, you can solve it using the ExpandConstant function :

 ExpandConstant('{param:subID}') 

If you need some kind of custom parsing, you will have to explicitly parse the command line, iterate over the parameter list using ParamStr and ParamCount .

See some answers in the related question above as well:

+2
source

Source: https://habr.com/ru/post/974805/


All Articles