Running an Alchemy Compatibility Package

Save to PDF

Applies to: Alchemy

21/06/2022 Cliff Hobbs   ID: 1354415

Once a Cloudhouse Alchemy Compatibility Package has been deployed, it can be run using the Cloudhouse.Container.Run.exe command-line tool.

Running a Compatibility Package first adds the registry keys contained in the AppRegistry.xml file included within your Compatibility Package into the Cloudhouse registry hive. Then the packaged application is run virtually under AAV.

How a Compatibility Package runs depends on which command-line options are included, including whether a RunCondition is specified.

Delete

Note

The Programs.xml file included within a Compatibility Package can consist of multiple Run Conditions, which are used to configure how an application is run and the configuration it uses.

If no command-line options are specified, the Compatibility Package is run as detailed in Running a Compatibility Package using the default RunCondition.

If you want to use a specific RunCondition to run a Compatibility Package, see Running a Compatibility Package using a specific RunCondition

Delete

Note

The following commands assume you have navigated to the DeployDir provided as an argument during the deployment of the Compatibility Package.

Running a Compatibility Package using the default RunCondition

 To run a Compatibility Package using the default RunCondition:

  1. Start a Command Prompt as a regular user.
  2. Navigate to the deployment directory (DeployDir).
  3. Run the following command:

Cloudhouse.Container.Run.exe

This runs the application associated with the Initial run condition specified in the Programs.xml file within the Compatibility Package.   

Running a Compatibility Package using a specific RunCondition

To run a Compatibility Package using a specific RunCondition:

  1. Start a Command Prompt as a regular user.
  2. Navigate to the deployment directory (DeployDir).
  3. Run the following command:

Cloudhouse.Container.Run.exe --RunConditions <runcondition>

Where <runcondition> is a RunCondition specified in the Programs.xml file within the Compatibility Package. This will run the application under AAV using the configuration specified for that RunCondition.

Example: Running Notepad++ in a Compatibility Package

If you have previously packaged Notepad++, you will have a Programs.xml  similar to the following:

<Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Program>
     <RunCondition>run1</RunCondition>
     <ProcessWindowStyle>Normal</ProcessWindowStyle>
     <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
     <Args>/f "%DefaultDir%\ProgData\Program Files (x86)\Notepad++\notepad++.exe" %FILEARGS%</Args>
     <WorkingDirectory>%DefaultDir%\ProgData\Program Files (x86)\Notepad++</WorkingDirectory>
     <WaitCondition TimeoutInSeconds="0">None</WaitCondition>
   </Program>
   <Program>
     <RunCondition>Initial</RunCondition>
     <ProcessWindowStyle>Normal</ProcessWindowStyle>
     <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
     <Args>/f "%DefaultDir%\ProgData\Program Files (x86)\Notepad++\notepad++.exe" %FILEARGS%</Args>
     <WorkingDirectory />
     <WaitCondition TimeoutInSeconds="0">None</WaitCondition>
   </Program>
   <Program>
     <RunCondition>FileArgs</RunCondition>
     <ProcessWindowStyle>Normal</ProcessWindowStyle>
    <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
     <Args>%FILEARGS%</Args>
     <WorkingDirectory />
     <WaitCondition TimeoutInSeconds="0">None</WaitCondition>
   </Program>
</Programs>

If you run the following command:

        Cloudhouse.Container.Run.exe

the Initial RunCondition is executed by default:

<Program>
    <RunCondition>Initial</RunCondition>
    <ProcessWindowStyle>Normal</ProcessWindowStyle>
    <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
    <Args>/f "%DefaultDir%\ProgData\Program Files (x86)\Notepad++\notepad++.exe" %FILEARGS%</Args>
    <WorkingDirectory />
    <WaitCondition TimeoutInSeconds="0">None</WaitCondition>
</Program>

which virtualises Notepad++ under AAV.

However, if you run the following command:

Cloudhouse.Container.Run.exe --RunConditions run1

the run1 RunCondition will be executed:

<Program>
  <RunCondition>run1</RunCondition>
  <ProcessWindowStyle>Normal</ProcessWindowStyle>
  <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
    <WorkingDirectory>%DefaultDir%\ProgData\Program Files (x86)\Notepad++</WorkingDirectory>
     <WaitCondition TimeoutInSeconds="0">None</WaitCondition>
</Program>

which virtualises Notepad++ under AAV using the settings configured for the run1 RunCondition.

Optional Arguments

The following optional arguments can be combined as desired. For example:

C:\deployedpackage\NotePad++\Cloudhouse.Container.Run.Exe --RunConditions run1 --FileArgs C:\temp\openme.txt

FileArgs

Optionally used to specify the file arguments for the application you wish to run, overriding any arguments specified in the Programs.xml for the Initial or the specified RunCondition.

To run a Compatibility Package with the specified FileArgs, simply run the following command in a Command Prompt:

<path_to_deployed_package>\Cloudhouse.Container.Run.Exe --FileArgs C:\temp\openme.txt

where <path_to_deployed_package> is the path to the Compatibility Package you wish to run. For example:

C:\deployedpackage\NotePad++\Cloudhouse.Container.Run.Exe --FileArgs C:\temp\openme.txt

To explain this further, look at the Initial section of the example Programs.xml above and you will see the following line:

   <Args>/f "%DefaultDir%\ProgData\Program Files (x86)\Notepad++\notepad++.exe" %FILEARGS%</Args>

Assuming you run the following command where you do not specify the –FileArgs argument, just Notepad++ would be run:

C:\deployedpackage\NotePad++\Cloudhouse.Container.Run.Exe

Contrast this to running the following command, where you are including the –FileArgs argument and specifying C:\temp\openme.txt as a File Argument:

<path_to_deployed_package>\Cloudhouse.Container.Run.Exe --FileArgs C:\temp\openme.txt

Running this command, Notepad++ runs and automatically loads the C:\temp\openme.txt file.

Source:
Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support