Skip to main content

May 7, 2025

Running Horizon Windows Client From the Command Line

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 executable command which shares the same name as the application executable file. The executable command includes options that you can specify to change the behavior of Horizon Client.

Horizon Client Command Use

The syntax of the executable command controls the operation of Horizon Client.

Use the following form of the executable command from a Windows command prompt.

[executable] [command_line_option [argument]] ...

The default path to the executable command executable file depends on the client system. You can add this path to the PATH environment variable on the client system.

The following table shows the command-line options that you can use with the executable command.

Horizon Client Command-Line Options
OptionDescription
/?Displays the list of command options.
-appName application_nameSpecifies 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 protocolSpecifies the published application display protocol to use, if available. The valid protocols are as follows:
  • Blast
  • PCoIP
-appSessionReconnectionBehavior argumentSpecifies the published application reconnection behavior setting. The valid arguments are as follows:
  • always
    Implements the <strong>Reconnect automatically to open applications</strong> setting.</li>
    
  • never
    Implements the <strong>Do not ask to reconnect and do not automatically reconnect</strong> setting.</li>
    
  • ask
    Implements <strong>Ask to reconnect to open applications</strong> setting.</li>
    
When you use this option, the published application reconnection settings are disabled in Horizon Client.
-args argumentSpecifies command-line arguments to add when a published application starts. For example:
[executable] -serverURL
10.10.10.10 -appName "My Notepad++" -args "\"my new.txt\""
-connectUSBOnStartupWhen 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.
-connectUSBOnInsertWhen 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_sizeSpecifies how to display the remote desktop window. The valid window size values are as follows:
  • fullscreen
    Full-screen display.</li>
    
  • multimonitor
    Multiple-monitor display.</li>
    
  • windowLarge
    Large window.</li>
    
  • windowSmall
    Small window.</li>
    
  • length X width
    Custom size, for example, 800 X 600.</li>
    
-desktopName desktop_nameSpecifies 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 protocolSpecifies the display protocol to use as it appears in the desktop and application selection window. The valid display protocols are as follows:
  • Blast
  • PCoIP
  • RDP
-domainName domain_nameSpecifies the NETBIOS domain that the end user uses to log in to Horizon Client. For example, use mycompany rather than mycompany.com.
-file file_pathSpecifies the path of a configuration file that contains additional command options and arguments.
-hShows help options.
-hideClientAfterLaunchSessionWhen set to true, hides the desktop and application selector window. When set to false, shows the desktop and application selector window.
-installShortcutsThenQuitUse 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:
[executable] -serverURL serverurl -userName user -domainName domain 
-password password -installShortcutsThenQuit

[executable] -serverURL serverurl -logInAsCurrentUser true -installShortcutsThenQuit

For information about server-created shortcuts, see Configure Shortcut Updates on Horizon Windows Client.
-languageId Locale_IDProvides 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.
-launchMinimizedStarts 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.
-listMonitorsLists index values and display layout information for the connected monitors. For example:
1: (0, 0, 1920, 1200)
2: (1920, 0, 3840, 1200)
3: (-900, -410, 0, 1190)
You use these index values in the -monitors option.
-loginAsCurrentUserWhen 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.
-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:
-monitors "1,2"
This option has no effect unless -desktopLayout is set to multimonitor.
-nonInteractiveSuppresses 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.
-password passwordSpecifies 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.
-printEnvironmentInfoDisplays the IP address, MAC address, and machine name of the client device.
-serverURL connection_serverSpecifies the URL, IP address, or FQDN of the server.
-shutdownShuts down all remote desktops and published applications and relevant user interface components.
-singleAutoConnectIf 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 PINSpecifies the PIN when an end user inserts a smart card to log in.
-usernameHint user_nameSpecifies the account name to use as the user name hint.
-standaloneStarts 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_nameSpecifies the full path of a text file. The content of the file is displayed in the About dialog box.
-unattendedStarts Horizon Client in a noninteractive mode that is suitable for clients in kiosk mode. You must also specify the following information:
  • The account name of the client, if you did not generate the account name from the MAC address of the client device. The name must begin with the string “custom-”, or an alternate prefix that you have configured in ADAM.
  • The password of the client, if you did not generate a password automatically when you set up the account for the client.
The -unattended option implicitly sets the -nonInteractive, -connectUSBOnStartup, -connectUSBOnInsert , and -desktopLayout multimonitoroptions.
-unauthenticatedAccessAccountSpecifies 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:
[executable] -serverURL horizon.mycompany.com 
-unauthenticatedAccessEnabled true 
-unauthenticatedAccessAccount anonymous1
-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.
-useExistingEnables you to start multiple remote desktops and published applications from a single Horizon Client session. When you specify this option, Horizon Client determines whether a session that has the same user name, domain, and server URL exists and, if it does, reuses that session instead of creating a session. For example, in the following command, user-1 starts the Calculator application and a new session is created.
[executable] -userName user-1 -password secret 
-domainName domain -appName Calculator 
-serverURL horizon.mycompany.com -useExisting
In the next command, user1 starts the Paint application with the same user name, domain, and server URL, and the same session is used.
[executable] -userName user-1 -password secret 
-domainName domain -appName Paint 
-serverURL horizon.mycompany.com -useExisting
-userName user_nameSpecifies 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 -file file_path option of the executable 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?

Provide feedback for this topic

Was this topic helpful?

Please do not include any personal or confidential information.

Generating link…