Agent-Client.exe Commands

The following describes the available commands for agent-client.exe. Be sure to wrap all complex passwords in double-quotes like "&()[]{}^=;!'+,`~ my c0mpl3x PW". As a result of this requirement, double quotes cannot be used in passwords or AES secrets. Paths that include a space also require double quotes.

Command Description

Help

Displays the command line options
Usage: agent-client.exe Help

Create Package

Creates a new package
Usage: agent-client.exe Create Package

[/AgentAddress <https://server:9074>] /AgentUsername <user> /AgentPassword "<pass>"

[/ArgFile <path\agent-client.args.json>]

[/CryptoKey "<my-aes-secret-key>"]

/Name "<name>"

/Path <path> *SEE BELOW

[/PathUsername <domain\user> /PathPassword "<pass>"]

[/AzureMaximumConcurrency <int>] -Azure download tuning. Default 64.

[/AzureInitialTransferSizeMb <int>] -Azure download tuning. Default 1.

[/AzureMaximumTransferSizeMb <int>] -Azure download tuning. Default 1.

[/CustomStorageUrl <url> (Custom S3 service URL or Azure endpoint suffix)].

[/SizeGb <GBs>] –Defaults to 20GB

[/Fixed] –Creates a fixed vhdx instead of the default expandable.

[/Test] –Leaves some .bmp files behind to make it easier to see what shortcuts were captured.

[/PuAddress <https://pu.server:8000> /PuUsername "<domain\user>" /PuPassword "<pass>"] –Registers new packages in inventory.

/Installer <path\installer.exe> **SEE BELOW

[/InstallerUsername <domain\user> /InstallerPassword "<pass>"]

[/InstallerArgs <args>]

[/InstallerExitCode <int>] –Expected installer exit code, else error. Default 0

[/InstallerTimeoutMs <ms>] –How long to wait for the installer to finish, else error. Default 1hr

[/WaitAfterInstallerExitsMs <ms>] –Wait after installer exits before completing capture. Default 0

[/DontCopyInstallerLocal] –Will not copy the installer locally before running the installer. Default false; Does copy.

[/CopyInstallerFolderLocal] –Copies the folder containing the installer file locally before executing. Default false except for script installers.

[/InstallerFolder <path>] –Change from the default installer path of the folder containing the installer to a custom path to be copied locally before executing the installer.

[/NoHCCapture] –Do not use high compatibility capture mode. Default false; Use HC Mode.

[/NoSystemRestore] –Do not perform a System Restore rollback at the end of the capture/extend. Default false; use System Restore to rollback.

[/AltRestoreCmd <path\file>] –Instead of using System Restore, use a cmd to rollback, implies /NoSystemRestore.

[/AltRestoreCmdArgs <args>]

[/Installer2 <path\installer.exe> **SEE BELOW

[/InstallerArgs2 <args>]

[/InstallerExitCode2 <int>]]

...

[/Installer10 <path\installer.exe> **SEE BELOW

[/InstallerArgs10 <args>]

[/InstallerExitCode10 <int>]]

[/PreActivationScript <path\file>]

[/PostActivationScript <path\file>]

[/PreDeactivationScript <path\file>]

[/PostDeactivationScript <path\file>]

[/NoCallToHome] –Do not send installer and installer args data to Liquidware.

[/PackageVersion <major.minor.build.revision>] –User specified version to help track package changes.

[/DontCreateFlexAppOne] –Do not automatically create a FlexApp One EXE. Default false; Do create EXE.

[/FlexAppOneCliOverride <args>] –Custom FlexApp One Bundler command line args.

[/DontCaptureUserProfileData] –Do not capture user profile data.

[/DontCaptureUserRegistry] –Don’t capture user registry data from HKCU or HKU.

[/DontCapture] –Do not capture at all, just install.

[/PackagesXml] –Write a copy of package info into the specified packages.xml so it can be inventoried using FlexApp Packaging Console in "Offline Mode".

[/PuConfiguration <configname> /PuFilter <filtername> [/PuDescription <descr>]] –Replaces existing package in specified configuration with created package. /Name and /PuFilter must match existing package assignment, with differing /PackageVersion values.

Create ArgFile
(Optional, omit all params to get an empty template file)

Creates optional ArgFile with default params used by packaging jobs
Usage:

agent-client.exe Create ArgFile

/ArgFile<path\defaults.json>

[/Crypto Aes /CryptoKey "<my-aes-secret-key>"]

[/MailServer <smtp.something.com>

/MailTo <a@b.com>

/MailFrom <x@y.com>

[/MailPort <integer>] [/MailSsl]

[/MailUsername <domain\user> /MailPassword "<pass>"]]

[--All 'Add PackagesFile' parameters are supported here--]

Get Job

Gets info on an existing job.
Usage:

agent-client.exe Get Job

[/AgentAddress <https://server:port>]

/AgentUsername <user>

/AgentPassword "<pass>"

[/ArgFile <path\agent-client.args.json>]

[/CryptoKey "<my-aes-secret-key>"]

[/Id <id>]

Get Status

Gets status info on the agent-service
Usage:

agent-client.exe Get Status [/AgentAddress <https://server:port>]

/AgentUsername <user>

/AgentPassword "<pass>"

[/ArgFile <path\agent-client.args.json>][/CryptoKey "<my-aes-secret-key>"]

Footnotes:

* /Path –Specifies the folder where the packages will be created

  • Specifying a /Path ending in a FlexApp package's filename.vhdx will perform an extend of that existing package.

  • Specifying a /PathUsername of "IAM" will attempt to use the Agent machine's assigned IAM roles to access the S3 bucket.

  • There are several ways to use /Path, depending on your target storage platform:

    • /Path "<\\server\share\target-path>" [/PathUsername "<domain\user>" /PathPassword "<pass>"]

    • /Path <s3://bucket/folder> /PathUsername <access key> /PathPassword <secret key>

    • /Path <s3://bucket/folder> /PathUsername "IAM"

    • /Path <az://bucket/folder> /PathUsername <account name> /PathPassword <account key>

    • /Path <gs://bucket/folder> /PathPassword "<path\credential.json>"

** /Installer –Specifies what should be installed, or executed and captured

  • /Installer –Supports several file types beyond EXE's and depending on the file extension, are automatically called by the associated interpreter:

    • MSI files will be automatically run via:
      msiexec.exe /i /qn.
      Additional Arguments can be passed in via /InstallerArgs.

    • Batch scripts (bat,cmd) are run via:
      cmd.exe /C "installerscript.bat" "</InstallerArgs>"

    • Windows Script Host files (vbs,vbe,wsf,wsc,js) are run via:
      cscript.exe /b /nologo "installerscript.vbs" "</InstallerArgs>"

    • Powershell (ps1) are run via:
      powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -NonInteractive -File "installerscript.ps1" "</InstallerArgs>"

  • /Installer –Copies the specified file into the local temp folder before executing it unless /DontCopyInstallerLocal is specified.

    • If the file specified is a script, then /CopyInstallerFolderLocal will be enabled so that supporting files are included.

    • The "InstallerFolder" is the folder containing the specified /Installer file unless otherwise specified using /InstallerFolder.

    • /InstallerFolder implies /CopyInstallerFolderLocal.

  • /Installer –Supports local disk paths, CIFS shares and http(s) URLs.