runProgram with third-party executables

Comments

8 comments

  • Avatar
    michiel

    Could you give us an example of how you are launching the sub installers with <runProgram> ? Are these sub installers msi?

    0
    Comment actions Permalink
  • Avatar
    Gnana Sundar R

    For e.g.

     

    {code}

    <runProgram>
    <program>".${platform_path_separator}sub_installers${platform_path_separator}sub-installer-windows.exe"</program>
    <programArguments>--installdir "${installdir}" --unattendedmodeui minimal --mode unattended --accept_eula YES --OTHER_PARM ${other_param}</programArguments>
    <progressText>Installing Sub Installer ...</progressText>
    <ruleList>
    <platformTest type="windows"/>
    </ruleList>
    </runProgram>

    {code}

    0
    Comment actions Permalink
  • Avatar
    michiel

    Could you check if setting the <workingDirectory>, (removing the quotes) and adding <wrapInScript>1<wrapInScript> would work:

    <runProgram>
       <workingDirectory>${platform_path_separator}sub_installers${platform_path_separator}<workingDirectory>
       <program>sub-installer-windows.exe</program>
       <programArguments>--installdir "${installdir}" --unattendedmodeui minimal --mode unattended --accept_eula YES -- OTHER_PARM ${other_param}</programArguments>
       <wrapInScript>1<wrapInScript>  
    </runProgram>

     

    0
    Comment actions Permalink
  • Avatar
    Gnana Sundar R

    Thank you Michiel. I will try it and let you know. By the way what is the purpose of wrapInScript and the intuition behind it?

    0
    Comment actions Permalink
  • Avatar
    michiel

    <wrapInScript> is a workaround for APIs for running processes to allow certain edge cases to be handled properly. For this particular action we prefer to suggest using it on a case by case basis, which allows us to troubleshoot if the cause is really a bug or rather an improper use of the action.

    0
    Comment actions Permalink
  • Avatar
    Gnana Sundar R

    When we include <wrapInScript> does it swallow the ${program_exit_code} in case of any failures in the sub installer?

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Gnana,

    It won't swallow the exit code. 

     

    Regards,

    Michiel D'Hont

    0
    Comment actions Permalink
  • Avatar
    Gnana Sundar R

    Thanks Michiel

    0
    Comment actions Permalink

Please sign in to leave a comment.