You can run Omnissa Horizon Client from the command line or from scripts. You might want to run Horizon Client from the command line if you are implementing a kiosk-based application that grants end users access to remote desktop applications.
To run Horizon Client from the command line, you use the horizon-client command. The horizon-client command includes options that you can specify to change the behavior of Horizon Client.
Horizon Client Command Use
The syntax of the horizon-client command controls the operation of Horizon Client.
Use the following form of the horizon-client command from a Windows command prompt.
horizon-client [command_line_option [argument]] ...
The default path to the horizon-client command executable file depends on the client system. You can add this path to the PATH environment variable on the client system.
- 64-bit systems:
C:\Program Files\Omnissa\Omnissa Horizon Client\ - 64-bit systems on ARM:
C:\Program Files (x86)\Omnissa\Omnissa Horizon Client\
The following table shows the command-line options that you can use with the horizon-client command.
| Option | Description |
|---|---|
| /? | Displays the list of command options. |
| -appName application_name | Specifies the name of the published application as it appears in the desktop and application selection window. The name is the display name that was specified for the application pool in the pool creation wizard. |
| -appProtocol protocol | Specifies the published application display protocol to use, if available. The valid protocols are as follows:
|
| -appSessionReconnectionBehavior argument | Specifies the published application reconnection behavior setting. The valid arguments are as follows:
|
| -args argument | Specifies command-line arguments to add when a published application starts. For example: |
| -connectUSBOnStartup | When set to true, redirects all USB devices that are connected to the host to the remote desktop or published application. This option is implicitly set if you specify the -unattended option for a remote desktop. The default is false. |
| -connectUSBOnInsert | When set to true, connects a USB device to the foreground remote desktop or published application when you plug in the device. This option is implicitly set if you specify the -unattended option for a remote desktop. The default is false. |
| -desktopLayout window_size | Specifies how to display the remote desktop window. The valid window size values are as follows:
|
| -desktopName desktop_name | Specifies the name of the remote desktop as it appears in the desktop and application selection window. The name is the display name that was specified for the pool in the pool creation wizard. Important: Do not specify this option for clients in kiosk mode. This option has no effect when in the remote desktop runs in kiosk mode. For kiosk mode, the connection is made to the first remote desktop in the list of entitled remote desktops. |
| -desktopProtocol protocol | Specifies the display protocol to use as it appears in the desktop and application selection window. The valid display protocols are as follows:
|
| -domainName domain_name | Specifies the NETBIOS domain that the end user uses to log in to Horizon Client. For example, use mycompany rather than mycompany.com. |
| -file file_path | Specifies the path of a configuration file that contains additional command options and arguments. |
| -h | Shows help options. |
| -hideClientAfterLaunchSession | When set to true, hides the desktop and application selector window. When set to false, shows the desktop and application selector window.
Note: If -appName or -desktopName are used, Horizon Client always hides the selector window with or without -hideClientAfterLaunchSession. |
| -installShortcutsThenQuit | Use this option to install desktop and application shortcuts that are configured on the server. When you use this option with sufficient server authentication information, Horizon Client silently connects to the server, installs the shortcuts, and then quits. If server authentication fails, Horizon Client quits silently.
To install shortcuts on the client system automatically, create a script that runs when the client system starts up. For example: For information about server-created shortcuts, see Configure Shortcut Updates on Horizon Windows Client. |
| -languageId Locale_ID | Provides localization support for different languages in Horizon Client. If a resource library is available, specify the Locale ID (LCID) to use. For US English, enter the value 0x409. |
| -launchMinimized | Starts Horizon Client in minimized mode. If you provide the -appName or -desktopName option, Horizon Client remains minimized until the specified published application or remote desktop starts. You cannot use this option with the -unattended or -nonInteractive option. |
| -listMonitors | Lists index values and display layout information for the connected monitors. For example:
You use these index values in the -monitors option. |
| –lockUserName | Locks the provided user name for server login. This option can be used only when you specify the server address. Use this option to lock the username field for the Active Directory authentication type. |
| -logInAsCurrentUser | When set to true, uses the credential information that the end user provides when logging in to the client system to log in to the server and ultimately to the remote desktop. The default is false. |
| -machineName machine_name | Sends the RDSH/machine FQDN to the server to launch an application or desktop on the machine. This option only takes effect when the Allow Machine Name Selection setting is activated on the pool or farm. Also requires -desktopName, -appName, and -serverURL options to be specified to take effect. |
| -monitors"n[,n,n,n]" | Specifies monitors to use in a multiple-monitor setup, where n is the index value of a monitor. You can use the -listMonitors option to determine the index values of the connected monitors. You can specify up to four index values, separated by commas. For example:
This option has no effect unless -desktopLayout is set to multimonitor. |
| -nonInteractive | Suppresses error message boxes when starting Horizon Client from a script. This option is implicitly set if you specify the -unattended option. Note: If you log in to a server in non-interactive mode, you are not prompted to install Start menu shortcuts (if available), and shortcuts are installed by default. |
| -noHorizonAddins | Prevents loading of Horizon-specific virtual channels, such as Virtual Printing. |
| -password password | Specifies the password that the end user uses to log in to Horizon Client. The password is processed in plain text by the command console or any scripting tool. If you generate the password automatically, you do not need to specify this option for clients in kiosk mode. For improved security, do not specify this option. Users can enter the password interactively. |
| -printEnvironmentInfo | Displays the IP address, MAC address, and machine name of the client device. |
| -serverURL connection_server | Specifies the URL, IP address, or FQDN of the server. |
| -shutdown | Shuts down all remote desktops and published applications and relevant user interface components. |
| -singleAutoConnect | If the user is entitled to only one remote desktop or published application, connects to that remote desktop or published application after the user authenticates to the server. This setting saves the user from selecting a remote desktop or published application from a list that contains only one item. |
| -smartCardPIN PIN | Specifies the PIN when an end user inserts a smart card to log in. |
| -usernameHint user_name | Specifies the account name to use as the user name hint. |
| -standalone | Starts a second instance of Horizon Client that can connect to the same or a different server. This option is supported for backwards compatibility. Specifying -standalone is not necessary as it is the default behavior for the client. For multiple remote desktop connections to the same or a different server, using the secure tunnel is supported. Note: The second remote desktop connection might not have access to the local hardware, such as USB devices, smart, cards, printers, and multiple monitors. |
| -supportText file_name | Specifies the full path of a text file. The content of the file is displayed in the About dialog box. |
| -unattended | Starts Horizon Client in a noninteractive mode that is suitable for clients in kiosk mode. You must also specify the following information:
|
| -unauthenticatedAccessAccount | Specifies an Unauthenticated Access user account to use to log in anonymously to the server when Unauthenticated Access is enabled. If Unauthenticated Access is not enabled, this option is ignored.
For example: |
| -unauthenticatedAccessEnabled |
When set to true, enables Unauthenticated Access. If Unauthenticated Access is not available, the client can fall back to another authentication method. The Unauthenticated Access setting is visible, disabled, and selected in Horizon Client.
When set to false, requires you to enter your credentials to log in and access your applications. The Unauthenticated Access setting is hidden and deselected in Horizon Client. If you do not specify this option, you can enable Unauthenticated Access in Horizon Client. The Unauthenticated Access setting is visible, enabled, and deselected. |
| -useExisting |
Setting the -useExisting parameter enables you to control whether multiple Horizon Client instances can run simultaneously. When you set this parameter, Horizon Client maintains a single instance by prompting to close any existing session before starting the new one.
When the -useExisting parameter is set, you'll get an indicator to use a single instance of the client. A message displays to log off from the existing instance. Then once accepted, the new one opens up.
When the -useExisting parameter is not set, a new instance of the client opens.
Example:
Start the Calculator application and a client instance is opened:
Run another command with -useExisting you'll be prompted to log off the existing Calculator session before the new session starts: |
| -userName user_name | Specifies the account name that the end user uses to log in to Horizon Client. If you generate the account name from the MAC address of the client device, you do not need to specify this option for clients in kiosk mode. |
You can specify all options by Active Directory group policies, except for -file, -languageId, -printEnvironmentInfo, -smartCardPIN, and -unattended.
Note: Group policy settings take precedence over settings that you specify from the command line. The command-line options are case sensitive.
Horizon Client Configuration File
You can read command-line options for Horizon Client from a configuration file.
You can specify the path of the configuration file as an argument to the -filefile_path option of the horizon-client command. The file must be a Unicode (UTF-16) or ASCII text file.
Example of a Configuration File for a Noninteractive Application
The following example shows the contents of a configuration file for a noninteractive application.
-serverURL https://horizon.yourcompany.com
-userName autouser
-password auto123
-domainName companydomain
-desktopName autodesktop
-nonInteractive
Example of a Configuration File for a Client in Kiosk Mode
The following example shows a client in kiosk mode where the account name is based on the client's MAC address. The client has an automatically generated password.
-serverURL 145.124.24.100
-unattended
Was this page helpful?