Add Custom Actions

Applies To: Windows Server 2008, Windows Server 2012

You can enhance the connection experience for your users by providing additional programs that automatically start during the connection to your service. You can use the CMAK wizard to include custom actions in your connection profiles when users connect to your service. These custom actions can automatically start and use programs that users have already installed, or you can include the programs with your service profile.

Setting Description

Action type

Filters the Custom actions list to only include actions of the selected type.

Custom actions

The list of custom actions that are currently defined in the connection profile. Some might already be present due to your selections in previous pages of the wizard.


Add a new custom action to the connection profile. For details, see the "New/Edit Custom Action" section of this topic.


Edits an existing custom action. For details, see the "New/Edit Custom Action" section of this topic.


Removes the selected custom action from the list.

New/Edit Custom Action dialog box

When you choose to add or edit a custom action, this dialog box allows you to configure the action.

Setting Description


Specifies the name of this custom action.

Program to run

Specifies the command, executable program, dynamic-link library (DLL), or batch file to run to carry out this custom action. If the file is already present on the client computers, then specify the path to where the file is located. You can use environment variables such as %SystemRoot%.


Specifies the required command-line options for the custom action.

Action type

Specifies when, during the connection process, that the action is invoked. Options include:

  • Pre-init

  • Pre-connect

  • Pre-dial (for dial-up connections only)

  • Pre-tunnel (for┬ávirtual private network (VPN) connections only)

  • Post-connect

  • Monitored

  • Disconnect

  • On cancel

  • On error

Run this custom action for

Specifies the condition under which the custom action is performed. Options include:

  • All connections

  • All connections that involve dial-up

  • All connections that involve a tunnel

  • Connections that use only a tunnel

  • Connections that use only dial-up

Include the custom action program with this service profile

If the executable program for this action is not part of the standard deployment for your client computers, then you can include the file in the profile to be installed when the user installs the connection profile. The file is installed in the folder that contains the connection profile.

Program interacts with the user

Specifies that Connection Manager will only run the custom action if it is in an interactive state. If this check box is not selected and Connection Manager is in a non-interactive state, then a program called by the custom action that attempts to interact with the user will halt the connection process indefinitely, waiting for a response from the user.

Require Elevation

Specifies that the custom action requires the use of administrative privileges to complete. If User Account Control is enabled, selecting this check box causes Connection Manager to prompt the user for permission to continue (if the user is a member of the Administrators group), or for administrator credentials (if the user is not a member of the Administrators group).

For more information about custom actions, the action types, and the variable replaceable parameters, see on the Microsoft Web site.