You may want to have a logon script that only runs for a user when he or she connects to a Terminal Server through the Terminal Server client or by the console. Extracted from Microsoft Support, this is the original article.
You may want to have a logon script that only runs for a user when he or she connects to a Terminal Server through the Terminal Server client or by the console.
- Create your logon script and place it in the %SystemRoot%\System32 folder.
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).
- Run Regedt32.exe and go to the following value:
- After the last entry in the Appsetup value, place a comma and a space and then enter the name and extension of the logon script you placed in the %SystemRoot%\System32 folder. For example, if the value of Appsetup is:
Usrlogon.cmd, Rmvlinks.exeAfter adding an entry for Termlogon.cmd, the value would look like:
Usrlogon.cmd, Rmvlinks.exe, Termlogon.cmd