HOW TO: Automatically Run Programs When Users Log On to Windows 2000 Terminal Services (321707)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
This article was previously published under Q321707 IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
IN THIS TASK SUMMARY
This article describes how to use various methods to have programs start automatically when users log on to Terminal Services.
back to the topBy 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.
back to the topSpecify the Program to Start When You Create a New Connection
To create a new connection to the Terminal Services server:
- On the client computer, click Start, point to Programs, point to Terminal Services Client, and then click Client Connection Manager.
- In the Client Connection Manager Wizard, click Next.
- In the Connection name box, type a descriptive name for the connection.
- 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.
- 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.
- Click a screen resolution that is appropriate for you.
- Leave the Enable data compression and Cache bitmaps check boxes clear unless you are working over a slow dial-up link. Click Next.
- 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.
- Click Next, and then click Finish.
back to the topTo Change the Program to Start- On the client computer, click Start, point to Programs, point to Terminal Services Client, and then click Client Connection Manager.
- Click the connection to change.
- On the File menu, click Properties.
- 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.
back to the topBy Using the Environment Tab
To specify a program to start when a session connection is made by using the Environment tab:
- 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.)
- Double-click the user for whom you want to change the program that starts.
- On the Environment tab, under Starting program, click to select the Start the following program at logon check box.
- 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.
- 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.
back to the topBy Using a Program Shortcut in the Startup Folder- 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 - On the File menu, point to New, and then click Shortcut.
- In the Type the location of the item box, type the path and file name of the program to start.
- Click Next.
- Click the Startup folder, and then click Next.
- Type a name for the shortcut or accept the default.
- Click Finish, and then click OK.
back to the topBy 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.
- On the Terminal Services server, start Microsoft Management Console (MMC), and then add the Group Policy snap-in.
- Click Local Computer Policy, click Computer Configuration, and then click Administrative Templates.
- 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.
- Click Show, and then click Add.
- 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.
- Click OK.
back to the topBy 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:
- On the Terminal Services server, start Registry Editor (Regedt32.exe).
- Locate and then click the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run - On the Edit menu, point to New, and then click String Value.
- Type any name for the value, and then click Modify on the Edit menu.
- In the Value Data box, type the command line for the program that you want to start when users log on.
- Click OK, and then quit Registry Editor.
back to the topBy 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:
back to the topTo Assign a User Logon Script to a User- Start Computer Management.
- In the console tree, click Users (under System Tools and then Local Users and Groups).
- Double-click the user to whom you want to assign a logon script.
- Click the Profile tab.
- 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
back to the top
Modification Type: | Major | Last Reviewed: | 11/20/2003 |
---|
Keywords: | kbhowto kbHOWTOmaster KB321707 kbAudITPro |
---|
|