Logon Script for Terminal Server 2003

Posted on 2011-04-26
Last Modified: 2012-05-11
I have a 2003 Terminal CLOUD Server and have about three users that remote in for a virtual desktop environment. The server is NOT in a Domain or running AD. The server is only in a workgroup. I add users in Computer Management, Local Users and Groups.

I need to map a drive on each user account to a local folder on the same server. When I use the "Subst p: C:\folder" command it maps a P drive just fine and my software works. However, when I log off the user account and log back in, the P:\ drive is not mapped anymore. The drive won't stay mapped once you log off.

Therefore, my assumption is that I will need to run this command as a logon script. I created a text file with the command and named it file.bat. I see under the user properties, there is a Profile Tab with the User Profile settings where it appears that I could add the name of the file.

Since the Server is not a DC, I don't have the typical C:\Windows\sysvol\sysvol\domain.dom\scripts path to place the file.

Where does the file.bat file go in order for the TS Server to recognize the file to run it per user account?

Question by:billygreen
    LVL 13

    Accepted Solution

    I have this running on our network.

    It isn't done at the computer level, it is done at the user level (at least the way I have it set up)

    The OU with the users that need the drive as GP attached that runs the .bat at logon.

    This is done under Group Policy -> User Settings -> Admnistrative -> System -> Logon -> Run these programs at logon

    Here I have the .bat file that mounts the network drive listed. It runs each time the user in that OU logs in.

    Does that help?

    I can provide the .bat if you want to see it.
    LVL 9

    Expert Comment

    Also, if you use the /persistent:yes at the end of that command, it will be there after a logout/login.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
    Learn about cloud computing and its benefits for small business owners.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now