We help IT Professionals succeed at work.

why can i not get my drives mapped

hi,
i am using server 2008.  i am trying to map drives for my terminal server users. in each of their start up folder is  the same file " Map.bat"
C:\ProgramData\Microsoft\Windows\Start Menu\programs\start up

the bat reads as follows... :


rem If exist G: net use G: /D
rem If exist L: net use L: /D
rem if exist z: net use z: /D


if not exist g: net use g: \\kacpa\gdrive
if not exist g: net use l: \\kacpa\gdrive\drake
if not exist z: net use Z: \\kacpa\zdrive

yet only the G drive appears mapped.  i need only the g and the Z

can someone straighten out my syntax...?

Comment
Watch Question

Citrix Technology Professional - Fellow
CERTIFIED EXPERT
Most Valuable Expert 2019
Top Expert 2010
Commented:
net use g: /delete /y
net use l: /delete /y
net use Z: /delete /y

net use g: \\kacpa\gdrive
net use l: \\kacpa\gdrive\drake
net use Z: \\kacpa\zdrive


yep - just delete them and make them again

Author

Commented:
the z drive did not map.... any ideas...?
Carl WebsterCitrix Technology Professional - Fellow
CERTIFIED EXPERT
Most Valuable Expert 2019
Top Expert 2010

Commented:
do it from a command line and see what error is returned

Author

Commented:
lets take it right from the top...

firstly, where is the right place for this bat to reside?
should it be listed in every users start up folder in their staart menu?

when you say do it from a command line... what do you mean..

how would that be accomplished...i understand the cms   command.     but please be a littl emore basic.     i am not professional    just frstrated.
Carl WebsterCitrix Technology Professional - Fellow
CERTIFIED EXPERT
Most Valuable Expert 2019
Top Expert 2010

Commented:
Start
Run
selected Command Prompt or just type in CMD and press enter

type in the net use z: command line and see what error is returned

If every user is going to need the drives, why don't you just map the drives on the server itself and have them available for every user at anytime?

Author

Commented:
ok,

how would that be accomplished?
Carl WebsterCitrix Technology Professional - Fellow
CERTIFIED EXPERT
Most Valuable Expert 2019
Top Expert 2010

Commented:
From a command prompt on the server:

net use g: \\kacpa\gdrive /persistent:yes
net use l: \\kacpa\gdrive\drake /persistent:yes
net use Z: \\kacpa\zdrive /persistent:yes

There are other ways but they may require more knowledge to implement than you may have at this time.

Author

Commented:
this i can do....
but is it in the form of a bat?
and exactly where would that bat be saved...
how would it get ran each time someone logs on?:


i will not be back till after 12...:(
Carl WebsterCitrix Technology Professional - Fellow
CERTIFIED EXPERT
Most Valuable Expert 2019
Top Expert 2010

Commented:
If you map the drives on the server itself, they are there for everyone who logs on to the server.  No batch file required unless you want to create one (and place it anywhere you want) and run it in case the drives ever become unmapped.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.