Creating Containers with the Auto Packager Command Line

Overview

The Auto Packager includes a command line tool, the AutoPackagerCLI.exe, which can be used to generate a Container from the configuration specified in PackagerScript.xml.

Included in the root directory of the Auto Packager is a PowerShell script AutoPackagerCLI.ps1 which takes command line arguments and generates an XML document called PackagerScript.xml. This .XML file is read by AutoPackagerCLI.exe

AutoPackagerCLI.ps1 is best suited to script automation, and integrating into packaging workflows, for example Citrix AppDNA.


Definition of Parameters in the XML Configuration or Command Line 

AutoPackagerPath (optional): AutoPackager's install path, defaults to c:\programdata\cloudhouse\packager\

InstallerPath (mandatory): Path to the setup.exe, or the installer for the application to be packaged.

Arguments (optional): Arguments to be passed into the application's installer , defaults to /silent

AppName (mandatory): Name of the Container that will be created. 

AppDescription (optional): Description for the Container.

AppGuid (mandatory): Unique ID for the Container, defaults to AppName_Container

PackageFolder (mandatory): Container output folder 

InitialLaunchExecutable (mandatory): Path to the application's executable that will be launched from the program's shortcuts.


Command line packaging with AutoPackagerCLI.ps1

By default, the Auto Packager installs into the C:\ProgramData\Cloudhouse\Packager folder.

  1. Download and extract the attached zip into the default location of the Auto Packager.
  2. Open a PowerShell window, and change to the same folder as the Auto Packager.
  3. Run the command Set-RemoteExecutionPolicy Unrestricted
  4. Run the AutoPackagerCLI.ps1 script with the required arguments, for example
    • .\AutoPackagerCLI.ps1 -InstallerPath "C:\path\to\application\installer.exe" -PackageFolder "c:\path\to\output\container" -arguments "/force /quiet" -AppName application_name -InitialLaunchExecutable "c:\path\to\program.exe"

Command line packaging with AutoPackagerCLI.exe

By default, the Auto Packager Command Line Interface, installs into the C:\ProgramData\Cloudhouse\Packager folder. The executable generates a Container using the XML configuration file as input.

  1. Edit the configuration file C:\ProgramData\Cloudhouse\Packager\PackagerScript.xml and specify values for the following XML elements
    • InstallerPath 
    • Arguments
    • AppName
    • AppGuid
    • PackageFolder
    • InitialLaunchExecutable

  2. Ignore all other settings.

Example PackagerScript.xml

<?xml version="1.0"?>
<CommandLinePackagerSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <InstallerPath>c:\path\to\installer\setup.exe</InstallerPath>
  <Arguments>/repair /quiet</Arguments>
  <AppName>adksetup</AppName>
  <AllowDelayDownload>false</AllowDelayDownload>
  <UploadDetails>
     <PortalHostName>prod.cloudhouse.com</PortalHostName>
     <PortalUsername>username</PortalUsername>
     <PortalPassword>password</PortalPassword>
     <StorageRegion>eu-west</StorageRegion>
  </UploadDetails>
  <AppGuid>adksetup_container</AppGuid>
  <!-- This folder must exist -->
  <PackageFolder>c:\temp\adksetup</PackageFolder>
  <AppDescription>App description</AppDescription>
  <!-- Exe to be started by short cut -->
  <InitialLaunchExecutable>prog.exe</InitialLaunchExecutable>
  <!-- 0 = False, 1 = True -->
  <IsTelemetryEnabled>1</IsTelemetryEnabled>
</CommandLinePackagerSettings>
Was this article helpful?

Can't find what you're looking for?

Contact Support