Question

I'm not familiar with terminal servers and I can't find this information anywhere.

I wanted to know if the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersion\Run registry entry works on terminal servers or should I use the specific entry of HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\Microsoft\Windows\CurrentVersion\Run or HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\Microsoft\Windows\CurrentVersion\Run as I'm unsure of the differences.

I was hoping someone with more experience working with terminal servers could be of assistance

Was it helpful?

Solution

You use HKLM\SOFTWARE\Microsoft\CurrentVersion\Run in Terminal Server environment in the very same way you'd use it in "normal" environment. From KB321707 (it was written for Windows 2000, but applies to modern Windows versions as well):

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.

See the same KB for other ways to have programs start automatically when users log on to Terminal Services.


Regarding those ...\Terminal Server\... registry keys you mention in the question, they are part of so-called registry shadow. They are created by Terminal Services running in Install mode, and you do not normally need to work with them directly. Check out Nicholas Dille's The Shadow Key Companion if you're interested in the topic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top