Custom actions keys
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Custom actions keys
You can change how Connection Manager handles custom actions. To do this, you need to edit the service (.cms) file. The table in this topic covers the key names and values that pertain to the custom actions sections of the .cms file. This topic also describes the formats and conventions you should use in the .cms file.
Formats and conventions
Connection Manager creates service (.cms) files, which use the same format as Windows initialization (.ini) files and information (.inf) files. These files have several things in common:
Each file is divided into sections, with specific entries, called keys, assigned to the sections. A section heading is enclosed within brackets ([ ]). For example, [Strings] is a section containing text strings for messages. The keys for a section are not enclosed within brackets.
Each value specified for a numeric key must be an integer. Any noninteger value is truncated to an integer or ignored as invalid data. For example, 1.1 is truncated to 1 or ignored.
The order in which sections appear is not important; a particular section can be placed anywhere in the file.
Each comment in the file begins with a semicolon (;).
For more information on these formats and conventions, see the Microsoft Platform Software Development Kit (SDK) at the Microsoft Web site.
Table of custom actions keys
The following table shows the valid keys for custom actions in the .cms file, the function and use of each key, and where each key can be set. You can set different keys in the Connection Manager Administration Kit (CMAK) wizard or in the .cms file. If you change the .cms file with a text editor, rather than by using the Advanced Customization pane of the CMAK wizard, you must rebuild the profile afterward with the CMAK wizard.
Notes
In the following table, keys controlled by specific panes of the CMAK wizard are identified in the Set in column as CMAK. Although these keys appear in the .cms file, you should use the CMAK wizard to update these keys. If you change these keys by editing the .cms file, the CMAK wizard might overwrite them if you run it again on the same profile. Keys set in the Advanced Customization pane of the CMAK wizard are identified as .cms or .cmp, as appropriate.
Make sure that locations are specified either as the full path or in reference to the location of the .cmp file.
[Section] or key name | Value | Set in |
---|---|---|
[Pre-Init Actions] |
Pre-init actions that run as soon as the profile is accessed. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Pre-Connect Actions] |
Pre-connect actions that run before a connection is established. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Pre-Dial Actions] |
Pre-dial actions that run immediately before dialing. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Pre-Tunnel Actions] |
Pre-tunnel actions that run after a connection is established but before a VPN connection is established. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Connect Actions] |
Post-connect actions that run after a connection is established and, if using a VPN connection, after the tunnel is established. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Disconnect Actions] |
Disconnect actions that run immediately before disconnecting. If a connection is prematurely dropped, these actions are run immediately after the disconnect. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[On-Cancel Actions] |
On cancel actions that run when the user cancels a session after the connection attempt has been started (any time that the user clicks Connect and then clicks Cancel). This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[On-Error Actions] |
On error actions that run when an error occurs. This section uses the following keys: #, #&Flags, and #&Description. |
CMAK .cms |
[Auto Applications] |
Monitored actions that run during a connection. Monitored actions are similar to custom actions, but they cause the disconnect sequence to start as soon as the last monitored application closes. This section uses the following keys: #, #&Flags, and #&Description. Unlike other custom actions, monitored actions do not support DLLs. |
CMAK .cms |
# |
A single custom action. The format of the value is # = Program, where # is an ID number from 0 to n and Program is the complete name of the program, including the extension and the path to the program. Programs start in sequence: 0 first, 1 next, and so on. Environmental variables, such as %UserName% and %ErrorCode%, are set in Connection Manager and can be used as parameters for custom action programs. |
CMAK |
#&Flags |
Whether a custom action runs when a specific type of connection is established. The format of the value is #&Flags = n, where # is the ID number of a defined custom action and n is a value indicating how dial-up and direct connections for that custom action are handled:
|
CMAK |
#&Description |
A short description of a custom action. The format of the value is #&Description = text, where # is the number of a defined custom action and text is the descriptive information for that custom action. This option can provide useful information when a synchronous custom action does not run properly. Default = the name of the custom action program. |
CMAK |