It is a pleasure to work with Setup Factory (v6.0.0.2), but the new variable %SetupCmdLineArgs% has given me headache. When no parameter is entered, I expected the variable to contain NUL. But No, the content is C:\Temp\irsetup.exe, and it is hard to notice the last invisible character (space). The variable ALWAYS has a space as the last character? If "NA" is entered as command line argument, the length of the string is 3 ("NA "). Without any trim-function I resolved the problem in this way:
IF "%SetupCmdLineArgs%" <> "%TempDir%" +"\\" + "irsetup.exe "
Length of String(%_LengthStringSCLArgs% = length of string "%SetupCmdLineArgs%"
Assign Value (%_LengthStringSCLArgs% = (%_LengthStringSCLArgs% - 1) 'Expression!
LeftString(%SetupCmdLineArgs%")= left-most %_LengthStringSCLArgs% characters of "%SetupCmdLineArgs%")
GOTO Label(Continue)
END IF
IF "%SetupCmdLineArgs%" = "%TempDir%" +"\\" + "irsetup.exe "
Assign Value (%SetupCmdLineArgs% = )
Assign Value (%_LengthStringSCLArgs% = 0) 'Expression!
END IF
Continue
------------------
/jfn
IF "%SetupCmdLineArgs%" <> "%TempDir%" +"\\" + "irsetup.exe "
Length of String(%_LengthStringSCLArgs% = length of string "%SetupCmdLineArgs%"
Assign Value (%_LengthStringSCLArgs% = (%_LengthStringSCLArgs% - 1) 'Expression!
LeftString(%SetupCmdLineArgs%")= left-most %_LengthStringSCLArgs% characters of "%SetupCmdLineArgs%")
GOTO Label(Continue)
END IF
IF "%SetupCmdLineArgs%" = "%TempDir%" +"\\" + "irsetup.exe "
Assign Value (%SetupCmdLineArgs% = )
Assign Value (%_LengthStringSCLArgs% = 0) 'Expression!
END IF
Continue
------------------
/jfn
Comment