Important information regarding the SoftGrid Knowledge Base (please read)

05/16/2007

Over the next few months, the SoftGrid Knowledge Base (http://support.softricity.com)will be migrated to the Microsoft Knowledge Base. The SoftGrid Answer IDs will become Microsoft Article IDs and they will be made available through the Microsoft Help and Support website (http://support.microsoft.com).

 

If searching this site does not return an appropriate answer, search the Microsoft Knowledge Base.

 

Once an answer has been migrated, the answer will be updated with the following information:

 

Notice

This SoftGrid Answer ID has been migrated to the Microsoft Help and Support website. For the most recent revision of this answer, click the following article number to view the article in the Microsoft Knowledge Base.

Article ID - Article Title

 

Some command line options with Softgrid

05/16/2007

Introduction
The operations SFTMime can perform fall into two categories, commands and queries. Commands are actions that must be performed that will have some affect on the state of the machine, like loading an application into cache. Queries are simply requests for information and will cause output to be displayed.

Command Format
All SFTMime commands are case sensitive. All commands have a similar structure. SFTMime is followed on the command line by a verb, an object, and additional parameters. The verb is any one of a basic set of instructions such as edit or load. The object is an application, a MIME server, or a file type association. Additional parameters vary from verb to verb and provide additional information. For instance, if the verb load is used with an application object, no parameters are required, but if the verb edit is used with an application, an additional parameter like a new icon file would be required.

Query Format
Queries all start with the verb query and are followed by an object type that identifies whether the query is on applications, servers, or file type associations. The queries available list all applications, all MIME servers, and all file type associations. The additional parameter that can be specified is used to toggle between a per-user view and a global view.

Output Format
Output can be displayed in one of three modes depending on how SFTMime was launched and what parameters it was passed. The GUI and log modes have already been implemented in previous releases; the console output mode is new in SoftGrid 3.0. If a command is run in a console window and no extension is specified for the name of the executable, Windows will launch the executable sftmime.com. This executable will allow output to be redirected sftmime.com's standard output pipe, resulting in the output being displayed in the console window. This is the standard technique used by Visual Studio (msdev.exe and msdev.com) to achieve the same effect. SFTMime supports a /console option that forces it to write to standard output even if it is not launched through sftmime.com and an existing console window. This allows custom code to be written that handles output directly from SFTMime. If sftmime.exe is launched directly, by default it will display any output graphically. Queries will all fail since sftmime.exe does not support displaying 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. Specifying the /gui option on the command line will force SFTMime into this graphical mode, even if it is launched with sftmime.com. If SFTMime is launched with the /log parameter followed by the path to an output file, it will redirect all output, command errors as well as queries, to the specified file. The file will be appended to each time SFTMime is run.

Object and Type Identifiers
Objects (applications, file type associations, MIME servers, and types of objects) need to be identified on the command line. All objects are preceded by an indicator as in the table below.


 

 

Type of Object

 

 

Indicator

 

 

Examples

 

 

application

 

 

app: []

 

 

app:DefaultApp
app:"MS Notepad"
app:"Word 9.0"

 

 

file type association

 

 

type:

 

 

type:txt
type:doc

 

 

MIME server

 

 

server:

 

 

server:sgserver
server:"Eric's MIME Server"

 

 

types of objects (used with the query verb)

 

 

obj:{app | type | server}

 

 

obj:app
obj:type
obj:server

 

 


Prior to SoftGrid 3.0, the syntax for the application indicator was slightly different ("app: version:") and the indicator for types of objects did not exist. The rest of the identifiers listed in this table are unchanged from previous releases.

Command Reference
Different verbs that can be used with SFTMime are valid in combination with different objects. The table below shows the effect of each combination. Combinations not listed in the table are not valid.
The load, lock, unload, and unlock verbs are new in SoftGrid 3.0, as is the /global parameter everywhere it is present. The /target parameter is a new addition to the file type association's configure verb. All other verbs and parameters listed below existed in previous releases. The /all parameter for the publish verb, which existed in previous releases, is gone.


 

 

Verb

 

 

Object

 

 

Parameters

 

 

Effect

 

 

/add

 

 

app:

 

 

/osd path or URL to OSD file
/icon path or URL to icon file (optional)

 

 

Adds the app described in the OSD file to the client and gives the current user access to it. Shortcuts may be published as a side effect.

 

 

/add

 

 

type:

 

 

/app application name and (optionally) /version of app
/icon path or URL to an icon file (optional)
/description human-readable description of the association (optional)
/global if present, make a per-machine association instead of per-user

 

 

Sets up an association between the app and the file type specified, using this icon or defaulting to the application's icon. By default, sets up the association just for this user.

 

 

/add

 

 

server:

 

 

/host server name or IP address
/port server port (optional)
/type HTTP, UDDI, or SoftGrid
/path path on the server
/refresh on or off, if "on" refresh when each user logs in (optional, defaults to "on" if not specified)

 

 

Sets up a new MIME server with the information on the command line.

 

 

/remove

 

 

app:

 

 

/complete if present, indicates complete removal of the app

 

 

Removes all app 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 app for all users, including removing 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, including removing it 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
/target full directory to publish shortcut to
/display display name for the shortcut (optional)
/icon path or URL to icon file (optional)
/args parameters to be passed to the app when the shortcut is activated (optional)

 

 

Publishes a shortcut for the application to the user's Desktop or Start Menu (for backwards 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 will be used.
The caller must specify exactly one of /desktop, /start, and /target.

 

 

/configure

 

 

app:

 

 

/icon a new icon to be associated with the app

 

 

Allows the user to change the icon associated with the app. The icon is stored on a per-machine basis so changes made by one user will be seen by all. Does not update the icon on existing shortcuts or file type associations.

 

 

/configure

 

 

type:

 

 

/icon a new icon to be used with the association (optional)
description: a new description for the association (optional)
/global if present, modify the global association

 

 

Allows 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 allows an administrator to change the global association.

 

 

/configure

 

 

server:

 

 

/name display name (optional)
/host server name or IP address (optional)
/port server port (optional)
/path path on server (optional)
/type UDDI, HTTP, or SoftGrid (optional)
/refresh on and off indicate whether user logins should trigger refreshes (optional)

 

 

Allows a user to change the setup of a server. Only administrators can make any of these changes. Any settings not specified will not be modified.

 

 

/refresh

 

 

server:

 

 

server name

 

 

Triggers a MIME server refresh for the current user

 

 

/load

 

 

app:

 

 

application name

 

 

Loads the ap