You can run 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 vmware-view.exe command. The vmware-view.exe command includes options that you can specify to change the behavior of Horizon Client.
Horizon Client Command Use
The syntax of the vmware-view command controls the operation of Horizon Client.
Use the following form of the vmware-view command from a Windows command prompt.
vmware-view [command_line_option [argument]] ...
The default path to the vmware-view command executable file depends on the client system. You can add this path to the PATH environment variable on the client system.
- 32-bit systems: C:\Program Files\VMware\VMware Horizon View Client\
- 64-bit systems: C:\Program Files (x86)\VMware\VMware Horizon View Client\
he following table shows the command-line options that you can use with the vmware-view command.
|/?||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:
When you use this option, the published application reconnection settings are disabled in Horizon Client.
|-args argument||Specifies command-line arguments to add when a published application starts. For example:
vmware-view.exe -serverURL 10.10.10.10 -appName "My Notepad++" -args "\"my new.txt\""
|-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.|
|-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:
vmware-view.exe -serverURL serverurl -userName user -domainName domain -password password -installShortcutsThenQuit vmware-view.exe -serverURL serverurl -loginAsCurrentUser true -installShortcutsThenQuit
For information about server-created shortcuts, see Configure Shortcut Updates.
|-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:
1: (0, 0, 1920, 1200) 2: (1920, 0, 3840, 1200) 3: (-900, -410, 0, 1190)
You use these index values in the -monitors option.
|-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.|
|-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.
|-noVMwareAddins||Prevents loading of VMware-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:
The -unattended option implicitly sets the -nonInteractive, -connectUSBOnStartup, -connectUSBOnInsert , and -desktopLayout multimonitoroptions.
|-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.
vmware-view.exe -serverURL view.mycompany.com -unauthenticatedAccessEnabled true -unauthenticatedAccessAccount anonymous1
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||Enables 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.
vmware-view.exe -userName user-1 -password secret -domainName domain -appName Calculator -serverURL view.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.
vmware-view.exe -userName user-1 -password secret -domainName domain -appName Paint -serverURL view.mycompany.com -useExisting
|-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.
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 vmware-view 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://view.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 18.104.22.168 -unattended