Article ID: 931588
Article Last Modified on 3/12/2007
APPLIES TO
- Microsoft SoftGrid for Terminal Services
- Microsoft SoftGrid for Windows Desktops
INTRODUCTION
This article discusses Microsoft SoftGrid Client 3.x
sftmime command-line options.
MORE INFORMATION
Basic flow
sftmime operations are either commands or queries. Commands are actions that have some affect on the state of the computer, such as a command that loads an application into the cache. Queries are requests for information that generate output.
Command format
All sftmime commands are case sensitive. All commands have a similar structure. The sftmime command is followed by a verb, an object, and additional parameters. The verb is any one of a basic set of instructions, such as instructions to edit or to load an object. The object is an application, a MIME server, or a file type association. Additional parameters vary depending on the verb and provide additional information. For example, if the /load verb is used together with an application object, no parameters are required. However, if the /edit verb is used together with an application, an additional parameter, such as a new icon file, is required.
Query format
Queries all start by using the /query verb and are followed by an object type that identifies whether the query applies to applications, to servers, or to file type associations. The queries that are available list all applications, all MIME servers, and all file type associations. The additional parameter that can be specified is used to switch between a per-user view and a global view.
Output format
Output can be displayed in one of three modes, depending on how the sftmime command was started and what parameters it received. The graphical user interface (GUI) mode and the log mode were implemented in previous releases. The console output mode was introduced in SoftGrid 3.0. If a command is run in a console window and if no extension is specified for the name of the executable, Windows will start the Sftmime.com program. This program lets you redirect output to its standard output pipe. Therefore, the output is displayed in the console window. This is the standard technique that is used by Microsoft Visual Studio (Msdev.exe and Msdev.com) to achieve the same effect. The sftmime command supports a /console parameter that forces the command to write to standard output even if the command was not started by using the Sftmime.com program and an existing console window. This behavior lets you write custom code that handles output directly from the sftmime command. If the sftmime command is started directly, it displays any output graphically. Queries will all fail because the sftmime command does not display query output in a graphical format. Commands will execute silently unless they fail, in which case they will display a graphical error message in the same format that all other SoftGrid error messages are displayed. If you specify the /gui parameter on the command line, you force the sftmime command into graphical mode, even if the command was started by using the Sftmime.com program. If the Sftmime.com program is started by using the /log parameter followed by the path of an output file, the program redirects all output, including command errors and queries, to the specified file. Information is appended to the file every time that the Sftmime.com program is run.
Object and type identifiers
Objects must be identified on the command line. All objects are preceded by an indicator as shown in the following table.
Type of object | Indicator | Examples |
Application | app: [] | app:DefaultApp app:"Notepad" |
File type association | type: | type:txt type:doc |
MIME server | server: | server:sgserver server:"My MIME Server" |
Types of objects (used together with the "query" verb) | type | server} | obj:app obj:type |
In previous releases of SoftGrid, the syntax for the application indicator was slightly different ("app: version:"). The indicator for types of objects did not exist. The rest of the identifiers that are listed in this table are unchanged from previous releases.
Command reference
Different verbs that can be used with the sftmime command are valid in combination with different objects. The following table shows the effect of each combination. Combinations that are not listed in the table are incorrect.
The following verbs are new in SoftGrid 3.0:
- /load
- /lock
- /unload
- /unlock
The /global parameter is also new. The /target parameter is a new addition to the file type association's /configure verb. All other verbs and parameters that are listed in the following table existed in previous releases. The /all parameter for the /publish verb is no longer available.
Verb | Object | Parameters | Effect |
/add | app: | /osd Path or URL to OSD file /icon Path or URL to icon file (optional) |
Adds the application that is described in the OSD file to the client and gives the current user access to the application. Shortcuts may be published as a side effect. |
/add | type: | /app application name and (optionally) /version of application. /icon Path or URL to an icon file (optional). |
Sets up an association between the application and the file type that is specified by using this icon or by defaulting to the application's icon. By default, sets up the association only for this user. |
/add | server: | /host server name or IP address /port server port (optional). |
Sets up a new MIME server that has the information on the command line. |
/remove | app: | /complete If present, indicates complete removal of the application | Removes all application integrations (shortcuts, file type associations) for the user who executes it. If /complete is specified and if the user is an administrator, completely removes the application for all users and removes it from the file system cache. |
/remove | obj:app | /complete If present, indicates complete removal of all applications. | Removes all applications, application integrations (shortcuts, file type associations) for the user who executes it. If /complete is specified and if the user is an administrator, completely removes all applications for all users. Also removes the application from the file system cache. |
/remove | type: | /global if present, indicates removal of the global association | Removes the specified file type association. If the caller is an administrator, a global association can be removed. Removing a global association for an extension does not remove different associations set up by individual users. |
/remove | server: | server name | Removes the MIME server. Only administrators can do this. |
/publish | app: | /desktop If present, publishes a shortcut to the caller's desktop. /start If present, publishes a shortcut to the caller's Start Menu. |
Publishes a shortcut for the application to the user's Desktop or Start Menu (for backward compatibility) or to any target directory. The target parameter can include environment variables. If an icon is specified, it will be used. If not, the default icon for the application is used. The caller must specify exactly one /desktop, /start, and /target option. |
/configure | app: | /icon A new icon to be associated with the application. | Lets the user to change the icon that is associated with the application. The icon is stored for each computer so changes that are made by one user are seen by all users. Does not update the icon for existing shortcuts or for file type associations. |
/configure | type: | /icon A new icon to be used with the association (optional). description: a new description for the association (optional) |
Lets the user to change the icon for the file type association. The icon is stored on a per-user basis with other file type association information. The global flag lets an administrator change the global association. |
/configure | server: | /name Display name (optional) /host Server name or IP address (optional) |
Lets a user change the setup of a server. Only administrators can make any of these changes. Any settings that are not specified will not be modified. |
/refresh | server: | server name | Triggers a MIME server update for the current user. |
/load | app: | application name | Loads the application into the file system cache (triggers SFTTray to show progress). |
/lock | app: | application name | Locks the application in the cache. |
/unlock | app: | application name | Unlocks the application in the cache. |
/unload | app: | application name | Unloads the application from the cache. Only administrators can do this. |
Query reference
Query support is new in SoftGrid 3.0. No query commands were available in previous releases. Application queries are displayed by using a single tab character that separates the name, the version, the OSD file, the icon file, the lock status, and the percentage in cache. One application is displayed per line of output. OSD files and icon files will always be absolute paths to files in the OSD directories and in the icon cache directories respectively. These directories are typically in the All Users\Documents directory. Lock status is either "Locked" or "Unlocked." File type associations will also be listed by using a tab character that separates the extension, the description, the application name and version, and the icon path. One association is listed for every line of output.
MIME servers are listed by using a tab character that separates the display name, the type, the host and port, the path, and the next update. The type is "HTTP," "UDDI," or "SoftGrid." The next update status will be as follows:
- Pending
If no update has occurred in the current user context since the user logged on.
- Ongoing
If an update is ongoing for the current user.
- Manual
If the server is not set up to auto-update.
- Login
If there is no activity. The server will refresh on the next logon for this user.
For applications and file type associations, the caller can also use the /global parameter. For example, the caller can use the following command:
sftmime /remove obj:app /global /complete
This command causes the query to return a list of all known applications and a list of global file type associations. The caller can also add the /short parameter. This parameter returns a simplified list of applications or associations.
Keywords: kbexpertiseinter kbtshoot KB931588