No announcement yet.


This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • %SetupCmdLineArgs%

    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


  • #2
    Re: %SetupCmdLineArgs%


    Thanks for the post; %SetupCmdLineArgs% appears to have a few bugs associated with it. These have already been passed onto our developers and they will be fixed in the next version of Setup Factory.

    If you want to trim %SetupCmdLineArgs% by one character use this method:

    Length of String (%Length% = length of string "%SetupCmdLineArgs%")
    Assign Value (%Length% = %Length% - 1)
    Left String (%SetupCmdLineArgs% = left-most %Length% characters of "SetupCmdLineArgs%")

    Also note: %SetupCmdLineArgs% is being set to: "%TempLaunchDir%\irsetup.exe" not "%TempDir%\irsetup.exe"

    MSI Factory The Next Generation Intelligent Setup Builder


    • #3
      Re: %SetupCmdLineArgs%

      %TempLaunchDir%: Yes, I have noticed the difference – thanks
      Browse Button – the screen starts with displaying just the "TempLaunchDir". I have posted a wish for the "My Computer" level (column "Suggest New Feature").



      • #4
        Re: %SetupCmdLineArgs%

        To trim any number of spaces from the end of a string:

        Length of String (%len% = ...)
        Assign Value (%index% = %len% - 1)
        Mid String (%char% = 1 char in ... starting at %index%)
        WHILE (%char = " ")
        &nbsp;&nbsp;&nbsp;&nbsp;Left String (string = left-most %index% characters of itself)
        &nbsp;&nbsp;&nbsp;&nbsp;Assign Value (%index% = %index% - 1)
        &nbsp;&nbsp;&nbsp;&nbsp;Mid String (%char% = 1 char in ... starting at %index%)
        END WHILE
        --[[ Indigo Rose Software Developer ]]