Terminal Services Group Rights

In Windows Server 2003 Standard, is there a way to assign similar terminal services profile to a Group?

For instance, there are several users for whom I want TS to launch a program upon connection. I do not want to configure this individually for each user.
scptechAsked:
Who is Participating?
 
scampgbCommented:
Hi scptech,
One way of achieving this would be to update your login script(s) to launch the application, if the user is a member of a specific group.

Here's a sample bit of VBS code to get you started:
Option Explicit
Dim objNetwork, objUser, CurrentUser,WshShell
Dim strGroup

Const TS_launch_Group = "cn=TS_launch_group"

Set objNetwork = CreateObject("WScript.Network")
' Forces script to skip errors (rem below line to see errors)
'on error resume next

Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = LCase(Join(CurrentUser.MemberOf))


if InStr(strGroup, TS_launch_Group) then
  Set WshShell = WScript.CreateObject("WScript.Shell")
  WshShell.Run("%windir%\notepad.exe")
end if



Please note that I haven't been able to test this, but it ought to work.  Much of the code was taken from http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_20975263.html#11005358

Does that help?
0
 
Ron MalmsteadInformation Services ManagerCommented:
Create a securit group in AD...e.g. Terminal Service App Group
Set the permissions on the program folder so that only the Terminal Service App group and Administrator has access.
Create a batch file with the follwing contents and place it in your c:\documents and settings\all users\start menu\startup
or...you can place this in your domain logon script.

-----

if %username% == Administrator exit
if exist "c:\program files\program folder\program.exe" "c:\program files\program folder\program.exe"
exit

-----

Since only users in this group can see the file....the script will only launch the app for them.
0
 
Ron MalmsteadInformation Services ManagerCommented:
PS: ADMINISTRATOR has to be in CAPS.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.