Results 1 to 4 of 4

Thread: Blocking Group Policy Logon Scrip When entering Terminal Ses

  1. #1
    Pstamato is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    3

    Default

    I currently am deploying a logon script to an ou of users via group policy. I do not want this logon script to run when a user starts a terminal server session. How would I go about blocking or stopping this from happening?

    Thank you

  2. #2
    AdamV is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    669

    Default

    How about something in the script to determine if it is running on a Terminal Server and then just terminate the script?

    What script language are you using?

    How many TS boxes are there? If very few then the easiest way would simply be to use a flag file on the server itself and detect that, rather than clever calls to get the OS type (although that's fairly easy to do too)

  3. #3
    Pstamato is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    3

    Default

    well i am using a .bat file to map network drives and then .vbs to specify printers. So basically the .bat files runs through the network drive mappings and then calls a vbscript which maps the network printers. There are 4 terminal servers that a user will need to be able to connect to. What do you think the best way to handle this is?? Would you do the entire script in VB or??? I`m not to sure what I would have to enter into the script or bat file to detect if it is on a terminal server. the terminal server names are: CSCTS01,CSCTS02,CSCTS03,and CSCTS04. Please any help is greatly apreciated I would like to just have a few vbscripts. One to map network printers and 1 to map network drives. Eliminating the .bat file. Have each one of these vb scripts detect if it is being applied to a terminal server and if so just cancel itself out.

  4. #4
    AdamV is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    669

    Default

    if there's only four servers then the laziest way would be to put a file eg c:\ThisIsMyTSBox.flg on the server and in the .bat use an IF Exist c:\etc. goto end

    Alternatively you could use the VBS to derive the hostname and use a case statement to exclude them, or specifically get the OS type which is a bit-wise breakdown of OS + role and whether or not TS is running. I'll see if I have any old notes on that (last time I did this was in a mixed environment so we used Kixtart rather than VB, but i'm sure someone else knows what I am talking about).

    This page might help:
    http://ts.veranoest.net/ts_faq.htm#DetectRemoteSession

    or maybe the tool referred to here:
    http://www.mcse.ms/archive54-2005-7-1661720.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO