Easy Detection of Which %PARAMx% Variable Contains Outcome

Hello G.D.G. Software,

With version 3.6.x, the best algorithm I can determine to find which of a set of variable input command line switches contains an option is to use the individual %PARAMx%. I would like to know if there is an easier method. Let me explain by example and see if there are other approaches.

When passing command line parameters, the invocation of the Paquet Builder output file is similar to:

PaquetBuilderOutputName.exe /log “The File Name To Write Messages.txt” /otherOption /optionOption2 /otherOption3

Alternatively it could be:
PaquetBuilderOutputName.exe /otherOption /optionOption2 /log “The File Name To Write Messages.txt” /otherOption3

For the rest of this description, I am using the first invocation example. The %PARAMCOUNT% is five. The individual %PARAMx% variables are:
%PARAM% = /log
%PARAM2% = The File Name to Write Messages.txt
%PARAM3% = /otherOption
%PARAM4% = /otherOption2
%PARAM5% = /otherOption3
%PARAMS% = /log “The File Name To Write Messages.txt” /otherOption /optionOption2 /otherOption3

By using the Find one string within another custom action, the /log option is easily detected. Then, an if statement search chain can be performed on each %PARAMx% variable to determine which one contains /log. The %PARAMx% variable one more than the /log %PARAMx% (e.g. x + 1) contains the string value to set an internal variable for use later. Note that the /log parameter location could move around. The only consistent thing is the pair of the /log and the quote surrounded file name to the right of /log.

Is there a way to concatenate a %PARAM% variable with the Perform operation on variable action. It would look similar to:
Operation: varConcatenate
Separator: (intentionally empty)
Value: %PARAM% concat 2
or
Value: %PARAM% + 3
Variable: %MYVARNAME%

The first way to set Value means %PARAM2%. In the alternative way to set Value, the result means %PARAM3%. Is there a different already existing action that accomplishes the result, without having a lot of new if/else statement combinations?

Thank you,

You can concatenate variables with the varAssign method of Perform operation on variable action:

For instance, if you enter %PARAM% %PARAM2% %PARAM4% as value, all variables are automatically replaced when the variable %NEWPARAM% is created.