How to launch software on final page and stop installer ?

Comments

2 comments

  • Avatar
    Dirk Stegemann

    On Windows, I'm appending an ampersand to the launch parameters; on Mac OS X , I'm using the open command (see x-man-page://open):

    <finalPageActionList>
        <runProgram> <!-- On Windows, use ampersand for asynchronous launch -->
            <program>path\to\software.exe</program>
            <programArguments>&amp;</programArguments>
            <progressText>${msg(LaunchSoftware.Checkbox.Name)}</progressText>
            (...)
            <ruleList>
                <platformTest type="windows" />
            </ruleList>
        </runProgram>
    
        <runProgram> <!-- On Mac OS X, use 'open' command for asynchronous launch -->
            <program>open</program>
            <programArguments>path/to/software.app</programArguments>
            <progressText>${msg(LaunchSoftware.Checkbox.Name)}</progressText>
            (...)
            <ruleList>
                <platformTest type="osx" />
            </ruleList>
        </runProgram>
    </finalPageActionList>
    

    Also, please have a look here: http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_launching_in_the_background

  • Avatar
    Neo Cortex

    I did the following for MacOSX:

    <finalPageActionList>
        (...)
        <setInstallerVariableFromRegEx run="1" show="0" >
            <name>escaped_installdir</name>
            <pattern> </pattern>
            <substitution>\\ </substitution>
            <text>${installdir}</text>
        </setInstallerVariableFromRegEx>
    
        <runProgram>
            <program>open</program>
            <programArguments> ${escaped_installdir}</programArguments>
            <progressText>some message</progressText>
            <runAs>${env(USER)}</runAs>
            <useMSDOSPath>0</useMSDOSPath>
            <workingDirectory>${installdir}/</workingDirectory>
        </runProgram>
    </finalPageActionList>
    

    And respectively for Linux:

    <finalPageActionList>
            <runProgram>
                <program>${installdir}/programname</program>
                <programArguments> &gt; /dev/null 2> /dev/null &lt; /dev/null &amp; disown </programArguments>
                <progressText>some message</progressText>
                <runAs>${env(SUDO_USER)}</runAs>
                <useMSDOSPath>0</useMSDOSPath>
                <workingDirectory>${installdir}/</workingDirectory>
            </runProgram>
        </finalPageActionList>
    

    Those did the trick.

Please sign in to leave a comment.