IT Employment

General discussion


Write batch file to map network drive

By jerry.a.smith ·
I would like to write a batch file that maps a network drive. I want to be able to e-mail an icon/shortcut to my users. Windows Xp and Win 2000 environment.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -


by jhansen In reply to Write batch file to map n ...

'<batch file body don't include this line>

net use x: \\server1\shairedfile

'<or to map a printer>
net use \\server1\printersharename

'<thats it, just call the file something like logon.bat or whatever.bat and it will work fine>

Check out for online backups. Computer techs, resellers needed. Sign up and start making extra money.

Collapse -


by noliver In reply to HERE IS HOW YOU DO IT


net use x: \\servername\sharename

Just wanted to clarify that for those who may be failing because they are trying to share a filename.

I love logon scripts btw and do almost anything I can in them from creating a poor-man's-proxy (hosts file with entries that gets copied to the local drive upon login) to displaying a prompt for software installations (or autoinstallations).

Collapse -

Or why not

by erding In reply to Actually

if using Active Directory, you can put the login scripts in your group policy objects. If you go to Active directoy users and computers, right click on you domain, or an OU and go to properties, group policy, edit policy, then go to user configuration, windows settings, scripts. Here you can add the script so that it runs every time that a user logs on. Then you don't have to worry about them remembering to click on the icon to map the drive.

Related Discussions

Related Forums