HOW TO: Automatically Run Programs When Users Log On to Windows 2000 Terminal Services

Article translations Article translations
Article ID: 321707 - View products that this article applies to.
This article was previously published under Q321707
Expand all | Collapse all

On This Page

SUMMARY

This article describes how to use various methods to have programs start automatically when users log on to Terminal Services.

By Using Client Connection Manager

You can specify a program to start either when you create a new connection in Client Connection Manager, or after you create a connection.

Specify the Program to Start When You Create a New Connection

To create a new connection to the Terminal Services server:
  1. On the client computer, click Start, point to Programs, point to Terminal Services Client, and then click Client Connection Manager.
  2. In the Client Connection Manager Wizard, click Next.
  3. In the Connection name box, type a descriptive name for the connection.
  4. In the Server name or IP address box, type the server's name or IP address, or click Browse to search for the server. When you finish, click Next.
  5. Leave all of the automatic logon information blank. Using automatic logon information might be a security is if a non-administrator has access to the computer from which you run the client. Click Next.
  6. Click a screen resolution that is appropriate for you.
  7. Leave the Enable data compression and Cache bitmaps check boxes clear unless you are working over a slow dial-up link. Click Next.
  8. Click to select the Start the following program check box, and then type the path and file name of the program that you want to start when a connection is made. In the Start in box, type the working folder, if required.
  9. Click Next, and then click Finish.

To Change the Program to Start

  1. On the client computer, click Start, point to Programs, point to Terminal Services Client, and then click Client Connection Manager.
  2. Click the connection to change.
  3. On the File menu, click Properties.
  4. On the Program tab, click Start the following program, and then type the path and file name of the program that you want to start when a connection is made. In the Start in box, type the working folder, if required.

By Using the Environment Tab

To specify a program to start when a session connection is made by using the Environment tab:
  1. Use the appropriate step:
    • For a domain user account, start Active Directory Users and Computers. In the console tree, expand the Domain node, and then click the folder in which users are located.
    • For a local user account, start Computer Management (Local). In the console tree, click Users. (Expand Computer Management, expand System Tools, expand Local Users and Groups, and then click Users.)
  2. Double-click the user for whom you want to change the program that starts.
  3. On the Environment tab, under Starting program, click to select the Start the following program at logon check box.
  4. In the Program file name box, type the path and file name of the program to start when the user logs on. You can also specify a working folder by typing the path in the Start in box.
  5. Click Apply.
Notes:
  • To start Active Directory Users and Computers, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
  • To start Computer Management, click Start, point to Settings, click Control Panel, double-click Administrative Tools, and then double-click Computer Management.

By Using a Program Shortcut in the Startup Folder

  1. On the Terminal Services server, start Windows Explorer, and then open the user's Startup folder. By default, this folder is:
    C:\Documents and Settings\Username\Start Menu\Programs\Startup
  2. On the File menu, point to New, and then click Shortcut.
  3. In the Type the location of the item box, type the path and file name of the program to start.
  4. Click Next.
  5. Click the Startup folder, and then click Next.
  6. Type a name for the shortcut or accept the default.
  7. Click Finish, and then click OK.

By Using Group Policy

You can specify programs or documents that are started automatically when a user logs on by using the "Run these programs at user logon" policy. NOTE: This policy appears in the Computer Configuration and User Configuration folders. If you configure both policies, Windows starts the programs that you specify in the Computer Configuration policy before it starts the programs that you specify in the User Configuration policy.
  1. On the Terminal Services server, start Microsoft Management Console (MMC), and then add the Group Policy snap-in.
  2. Click Local Computer Policy, click Computer Configuration, and then click Administrative Templates.
  3. Click the System object, double-click Run these programs at user logon in the list of Local System policies in the right pane, and then click Enable.
  4. Click Show, and then click Add.
  5. Type the name of the program (.exe) file or document file. Unless the file is located in the %SystemRoot% folder, you must specify the fully qualified path to the file.
  6. Click OK.

By Using the Registry

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

You can specify a command line in the registry to start a program when users log on to Terminal Services:
  1. On the Terminal Services server, start Registry Editor (Regedt32.exe).
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  3. On the Edit menu, point to New, and then click String Value.
  4. Type any name for the value, and then click Modify on the Edit menu.
  5. In the Value Data box, type the command line for the program that you want to start when users log on.
  6. Click OK, and then quit Registry Editor.

By Using a Logon Script

You can create a logon script that runs specific programs when users log on. You can assign that script to a user. For more information about creating logon scripts to configure user work environments, visit the following Microsoft Web site:
Using logon scripts to configure user work environments

To Assign a User Logon Script to a User

  1. Start Computer Management.
  2. In the console tree, click Users (under System Tools and then Local Users and Groups).
  3. Double-click the user to whom you want to assign a logon script.
  4. Click the Profile tab.
  5. In the Logon script box, type the path and name of the logon script that you want to assign to the user, and then click OK.
Notes:
  • To start Computer Management, click Start, click Programs, click Administrative Tools, and then click Computer Management.
  • The path to the logon script is relative to the local logon script path on the server.
For additional information about assigning scripts to users, click the article number below to view the article in the Microsoft Knowledge Base:
258286 How to Assign a Logon Script to a Profile for a Local User

Properties

Article ID: 321707 - Last Review: September 14, 2007 - Revision: 3.2
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbhowto kbhowtomaster KB321707

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com