When you have a large user base its not practical to go around mapping Network drives for each person. You can either do it through domain controller Group policy or by the use of batch files. You provides the user with batch file when clicked it will map the drives for them automatically.
Batch file is also useful when for some unknown reason drive map gets disconnected each time the computer restarts. You can put the batch file in startup configuration.
to accomplish this,
- Open notepad and type following.
@echo Create new L: drive mapping @net use L: \\ServerName\Folder\Folder\FolderA /persistent:yes @echo Create new K: drive mapping @net use K: \\ServerName\Folder\Folder\FolderB /persistent:yes :exit @pause
- Then save the file with .bat extension. Use any name.bat
- Now navigate to where you save it and click on it
- A command prompt should appear, Then Press any key to exit
- Create new L: Drive mapping >> create a new drive map with letter L.
- net use L: network path >> use drive map L for the specified network path
- Persistent:yes >> this attribute tells the system that the map is permanent.
- @pause >> to tell the cmd to not quit after executing the batch file.