# Solved: Map Network Drive



## mike_electron (Apr 17, 2008)

How to map a network drive that is always visible to all users in the domain. and also the domain users doesnt need to logon to the network drive.

Correct me if i am wrong what I recently did:

1. Create a map network drive under the domainname\administrator account

2. create a batch file stating:

@echo off
net use z: \\mainserver\shared folder /user:domainname\administrator password

3. place this batch file in the all users' start up folder


But when I try to log it on using another domain user, it is still not visible.

any help on this?


----------



## rhynes (Aug 14, 2006)

You can place the file under the "all users" profiles startup directory but you really should be using login scripts on the server. Add your login script to C:\WINDOWS\sysvol\sysvol\domainname.suffix\scripts on the server.

You don't need the /user:domainname\administrator password if your security is correct on the shared server drives.

Enter the script name in the user account under the "active directory users and computers" snap-in, you'll see login script under the profile tab. You do not need to add a path, just the script name. I tend to create one script for all users, map all the drives at once but if the users don't have access then they won't get into the mapped drive. 

there are different ways of pushing login scripts, but this is the easiest. You can actually start running other scripts for user logins, especially for autoinstalling network printers. Makes life so much easier.


----------



## mike_electron (Apr 17, 2008)

ok.il try this one.


----------



## mike_electron (Apr 17, 2008)

is the script you said is the same as the script in the batch file? if no, can you give me an example for that?


----------



## rhynes (Aug 14, 2006)

yep, pretty much... 

Don't use z: in your mappings tho... and try to keep to the higher letters. Don't use spaces in your shares. If you want to hide directories from users, it's simple. Share the folder with a $ at the end.


----------



## mike_electron (Apr 17, 2008)

thank you very much. it is now solved..


----------



## rhynes (Aug 14, 2006)

good stuff


----------



## JohnWill (Oct 19, 2002)

*You can mark your own threads solved using the thread tools at the top of the page in the upper right corner.©*


----------

