Posts tagged "command-line arguments"

Launching the Mosaic AIR client with command-line arguments

What better way is there to start a blog on Adobe LiveCycle Mosaic than to blog about a new way to start Mosaic?  Our latest release, ES2 9.5, includes command-line arguments that allow you to specify the user, password, server, and application to start when launching the Mosaic AIR client.  For example:

"C:\Program Files (x86)\Adobe LiveCycle Mosaic\Adobe LiveCycle Mosaic.exe" -user designer -pwd password -server http://localhost:8080 -app ClientDashboard

Here’s how to do the same thing with an Ant script:

<property name="username" value="designer"/>
<property name="password" value="password"/>
<property name="protocol" value="http"/>
<property name="server"   value="localhost"/>
<property name="port"     value="8080"/>

<property name="mosaic_application"  value="ClientDashboard"/>
<property name="mosaic_air_exe_file" value="Adobe LiveCycle Mosaic.exe"/>
<property name="mosaic_air_exe_dir"  location="C:/Program Files (x86)/Adobe LiveCycle Mosaic"/>
<property name="mosaic_air_exe_path" location="${mosaic_air_exe_dir}/${mosaic_air_exe_file}"/>

<!-- Start Mosaic AIR application with command-line arguments -->
<exec failonerror="true" executable="${mosaic_air_exe_path}">
    <arg value="-user"/>
    <arg value="${username}"/>
    <arg value="-pwd"/>
    <arg value="${password}"/>
    <arg value="-server"/>
    <arg value="${protocol}://${server}:${port}"/>
    <arg value="-app"/>  <!-- Specify application to start -->
    <arg value="${mosaic_application}"/>

Note: If the Mosaic AIR client is already started, this command will bring it to the front, but won’t change the running application.