--- title: SFTTRAY Command Reference description: SFTTRAY Command Reference author: manikadhiman ms.assetid: 6fa3a939-b047-4d6c-bd1d-dfb93e065eb2 ms.reviewer: manager: dansimp ms.author: dansimp ms.pagetype: mdop, appcompat, virtualization ms.mktglfcycl: deploy ms.sitesec: library ms.prod: w10 ms.date: 06/16/2016 --- # SFTTRAY Command Reference The Microsoft Application Virtualization (App-V) Client Tray application, sfttray.exe, is the main user interface element of the App-V Client that users will interact with during normal use. This program controls the streaming and starting of all virtual applications and is accessed by right-clicking the icon displayed in the notification area to display the menu of client functions. The menu enables the user to load applications, start a publishing refresh, cancel a request, or change the client to offline mode. The user can also close the Application Virtualization Client Tray application and all active applications by clicking **Exit**. By default, the icon is displayed whenever a virtual application is started, although you can control this behavior by using SFTTRAY commands. The Application Virtualization Client Tray application also displays a progress bar for each application that is started, as well as status messages about active applications. Clicking the progress bar displays a message that allows you to cancel the loading or starting of an application. ## SFTTRAY Commands The list of commands and command-line switches can be displayed by running the following command from a command window. **Note** There is only one Application Virtualization Client Tray instance for each user context, so if you start a new SFTTRAY command, it will be passed to the program that is already running. `Sfttray.exe /?` ### Command Usage `Sfttray.exe [/HIDE | /SHOW]` `Sfttray.exe [/HIDE | /SHOW] [/QUIET] [/EXE alternate-exe] /LAUNCH app [args]` `Sfttray.exe [/HIDE | /SHOW] [/QUIET] /LOAD app [/SFTFILE sft]` `Sfttray.exe [/HIDE | /SHOW] [/QUIET] /LOADALL` `Sfttray.exe [/HIDE | /SHOW] [/QUIET] /REFRESHALL` `Sfttray.exe [/HIDE | /SHOW] [/QUIET] /LAUNCHRESULT /LAUNCH app [args]` `Sfttray.exe /EXIT` ### Command-Line Switches The SFTTRAY command-line switches are described in the following table.
Switch Description

/HIDE

Hides the SFTTRAY icon in the Windows notification area.

/SHOW

Displays the SFTTRAY icon in the Windows notification area.

/QUIET

Supports unattended usage by preventing errors from displaying message boxes that require user acknowledgement.

/EXE <alternate-exe>

Used with /LAUNCH to specify that an executable program is to be started in the virtual environment when a virtual application is started in place of the target file specified in the OSD.

Note

For example, use “SFTTRAY.EXE /EXE REGEDIT.EXE /LAUNCH <app>” to enable you to examine the registry of the virtual environment in which the application is running.

/LAUNCH <app> [<args>]

Starts a virtual application. Specify the name and version of an application or the path to an OSD file. Optionally, command-line arguments can be passed to the virtual application.

Note

Use the command “SFTMIME.EXE /QUERY OBJ:APP /SHORT” to obtain a list of the names and versions of available virtual applications.

/LOAD

Loads or imports a virtual application.

/LOADALL

Loads all applications into cache.

/REFRESHALL

Starts a publishing refresh for all applications.

/LAUNCHRESULT <UNIQUE ID>

Returns the launch result code to the process that launches sfttray.exe by using a global event and a memory mapped file that are based on the specified root name for the UNIQUE ID.¹

/SFTFILE <sft>

Optional switch used with /LOAD to specify the path to the application’s SFT file. If specified, the application is imported rather than loaded.

/EXIT

Closes the SFTTRAY program and all active virtual applications and removes the icon from the Windows notification area.

**Note** ¹ The */LAUNCHRESULT* command line parameter provides a means for the process that launches sfttray.exe to specify the root name for a global event and a memory mapped file that are used to return the launch result code to the process. The unique identifier name should start with “SFT-” to prevent the event name from getting virtualized when the launching process is invoked within a virtual environment. The memory mapped region will be 64 bits in size. To use this parameter, the launching process creates an event with the name “<UNIQUE ID>-result\_event”, a memory mapped file with the name “<UNIQUE ID>-result\_value”, and optionally an event with the name “<UNIQUE ID>-shutdown\_event”, and then the launching process launches sfttray.exe and waits on the event to be signaled. After the event “<UNIQUE ID>-result\_event” is signaled, the launching process retrieves the 64-bit return code from the memory mapped region. If the optional event “<UNIQUE ID>-shutdown\_event” exists when the virtual application exits, sfttray.exe opens and signals the event. The launching process waits on this shutdown event if it needs to determine when the virtual application exits.