Article ID: 931588 - View products that this article applies to.
This article discusses Microsoft SoftGrid Client 3.x sftmime command-line options.
Basic flowsftmime 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 formatAll 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 formatQueries 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 formatOutput 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 identifiersObjects must be identified on the command line. All objects are preceded by an indicator as shown in the following table.
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.
Collapse this tableExpand this table
Command referenceDifferent 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:
Collapse this tableExpand this table
Query referenceQuery 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:
sftmime /remove obj:app /global /completeThis 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.