Export (0) Print
Expand All

Specify a program to start automatically when a user logs on

Updated: January 21, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To specify a program to start when a user logs on

Using Group Policies (best practice)

  1. Open Group Policy.

  2. In Computer Configuration, Administrative Templates, Windows Components, Terminal Services, double-click the Start a program on connection setting, and then click Enabled.

    • If the status is to Not Configured, then Terminal Services cannot start a specified initial program automatically when a client connects to a terminal server, unless an initial program is specified in the default user profile and in Remote Desktop Connection or the Terminal Services client. If an initial program is not specified, then the user must start programs by using the default desktop that is displayed during the Terminal Services session.

    • If the status is set to Disabled, then Terminal Services cannot start a specified initial program automatically when a client connects to a terminal server. Instead, the user must start programs by using the default desktop that is displayed during the Terminal Services session.

  3. If you selected Enabled, in the Program path and file name box, type the path and file name of the program you want to start when a user logs on.

  4. In the Working Directory box, type the working directory, and then click OK.

Important

  • You should thoroughly test any changes you make to Group Policy settings before applying them to users or computers. For more information on testing policy settings, see Resultant Set of Policy.

Notes

  • Use the above procedure to configure the local Group Policy object. To change a policy for a domain or an organizational unit, you must log on to the primary domain controller as an administrator. Then, you must start Group Policy by using the Active Directory Users and Computers snap-in.

  • These policies affect every client that connects to the terminal server. To specify a program to start on a per-user basis, use the corresponding policy under User Configuration.

Using Terminal Services Configuration

  1. Open Terminal Services Configuration.

  2. In the console tree, click Connections.

  3. In the details pane, right-click the connection for which you want to specify an initial program, and then click Properties.

  4. On the Environment tab, under Initial program, select Start the following program when the user logs on. This option allows you to configure an initial program for the connection.

    • If you select Do not allow an initial program to be launched. Always show desktop, then Terminal Services cannot start a specified initial program automatically when a client connects to a terminal server. Instead, the user must start programs by using the default desktop that is displayed during the Terminal Services session.

    • If you select Run initial program specified by user profile and Remote Desktop Connection or Terminal Services client, then the program that is specified in the default user profile and in Remote Desktop Connection or the Terminal Services client will run when the client connects to the terminal server.

  5. If you selected Start the following program when the user logs on, in Program path and file name, type the path and file name of the program that you want to start when the user logs on to the terminal server.

  6. In Start in, type the working directory path for the program, and then click OK.

Notes

  • To open Terminal Services Configuration, click Start, click Control Panel, double-click Administrative Tools, and then double-click Terminal Services Configuration.

  • To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

  • Group Policy overrides the configuration set with the Terminal Services Configuration tool.

  • Some client option settings are not applied when a connection is made to the console session of a remote computer running Windows XP. For example, if the client has specified a program to start upon connection to a remote computer, that program does not start if the connection is made to the console session of the remote computer. Instead, the default desktop appears. If the connection is made to a session other than the console session, the specified program starts as expected. The console session is the only session available for Remote Desktop on Windows XP Professional, so the default desktop always appears when a connection is made, even if the client has specified a different program.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft