General discussion

Locked

How to create mapping drives in Windows

By quangtranil ·
I tried to create mapping drives in Windows NT Server 4.0, but it would not recognize the commands. Please help. Below is a sample of my login script.

ECHO OFF
net use z: /delete
net use z: \\server\directory
net use y: /delete
net use y: \\server\directory
net use m: /delete
net use m: \\server\directory

if "%username%" = "tran_quang"
then net use o: \\server\Folder
end

if %member% = "it"
then net use o: \\server\Folder\Subfolder
end

This conversation is currently closed to new comments.

17 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to create mapping drives in Windows

by MtnSqs In reply to How to create mapping dri ...

Check the permissions on the directories you are trying to map to.

Also try map to a know share name instead

Collapse -

How to create mapping drives in Windows

by quangtranil In reply to How to create mapping dri ...

The question was auto-closed by TechRepublic

Collapse -

How to create mapping drives in Windows

by Robert W. In reply to How to create mapping dri ...

stick a "pause" command into your batch file..that might help you in pin point where the pb is. Also, check your policy. Uncheck Remove the "Map Network Drive" and "Disconnect Network Drive options", uncheck Hide Network Neighborhood, and uncheck Hide Drives in My Computer. Those things gave me major headacks in the past.

Collapse -

How to create mapping drives in Windows

by quangtranil In reply to How to create mapping dri ...

The question was auto-closed by TechRepublic

Collapse -

How to create mapping drives in Windows

by Ravi In reply to How to create mapping dri ...

If you have set "No Access" permission on NET.EXE, you won't be abe to use the NET command. So, if the suggestions above are not working, you may want to check this.

Good luck.

Collapse -

How to create mapping drives in Windows

by quangtranil In reply to How to create mapping dri ...

The question was auto-closed by TechRepublic

Collapse -

How to create mapping drives in Windows

by MRshawng In reply to How to create mapping dri ...

In your example, you are mapping to "\\server\directory" where "directory" should be a share on the server, if it isn't a share, that is one problem (same goes for the last net use, "Folder" has to be a share.).

The "if" statement requires two equal signs (if "%username%"=="tran_quang". Also, put the net use command on the same line with the if, and get rid of the "then" and "end" they aren't valid commands.

%member% is not a default variable. If you're checking the users group membership, try "ifmember.exe" it is a NT 4.0 resource kit utility.

REM out the ECHO OFF line so you can see what the script is trying to do, and then what it actually does. Put a pause at the end of the file, and if necessary at various points within.You can type the command and then /? to get information on how to use most of the NT command line programs.

Hope this helps.

Collapse -

How to create mapping drives in Windows

by quangtranil In reply to How to create mapping dri ...

The question was auto-closed by TechRepublic

Collapse -

How to create mapping drives in Windows

by kellyst In reply to How to create mapping dri ...

time to buy an NT book, don't you think? You can map to shares not directories. Spend the 30 bucks and get a book.

Collapse -

How to create mapping drives in Windows

by quangtranil In reply to How to create mapping dri ...

The question was auto-closed by TechRepublic

Back to Windows Forum
17 total posts (Page 1 of 2)   01 | 02   Next

Operating Systems Forums