Problem With Mapping a drive for all users in terminal service

I have one problem.


I try to map a network drive for all users by placing a cmd file with:

net use q: \\server\share password /user:domain\user /persistent:no

in startup folder for all users.


It works fine as long as users logon using remote desktop to the desktop.

But if I in the setting for the remote desktop connection (client machine) to just point to the exe file that should rum.
(the should not ´run the desktop). The network drive is not conected for the user.

How can I get around this?

LVL 1
puckoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

harleyjdCommented:
Why not set up a profile for the users that already has Q: mapped? You can make that profile the Default User profile, and all users who log on will already have the drive available as they log in.

0
puckoAuthor Commented:
Can you tell me more about this? How can I do that?
0
harleyjdCommented:
create a user called "temp"

logon as temp

in explorer choose the option to map network drive, and connect as another user (why do you need to connect as a different user, btw?) leave "reconnect at logon" ticked

log off.

lonon as admin

copy the contents of c:\documents and settings\temp to c:\documents and settings\default user then when a real user logs in they will get the drive already mapped. You can use this procedure to pre-setup shares, printers, quicklaunch bars etc...

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

ColinRoydsCommented:
have you tried creating a login script and then adding it in to the ADUC / user proerties / terminal server profile / logon script
if the user is a member of the domain try using "net use q: \\server\share"
if you want to see why this is happening edit the login script and put pause at the end then run it and you will be able to see the error as to why it cannot map the drive
0
ColinRoydsCommented:
example

net use q: \\server\share password /user:domain\user /persistent:no
pause
0
harleyjdCommented:
I think the problem is that the drive mapping is not taking place because he is enabling the TS application restriction. Maybe a server level script will ignore the restriction...

0
ColinRoydsCommented:
you could also do it through group policies
0
harleyjdCommented:
Yeah, I was agreeing with your idea. :)

0
puckoAuthor Commented:
How do I " do it through group policies"
0
ColinRoydsCommented:
you can either set a home directory under the terminal services options in computer configs / admin templates / windows comp / terminal service
Or you can set a logon script under the user config / windows settings / scipts / logonall in GP
Or you could even call a program being a batch file using the start app at logon policy
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

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.