General discussion

Locked

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.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

HERE IS HOW YOU DO IT

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 http://www.zray.net for online backups. Computer techs, resellers needed. Sign up and start making extra money.

Collapse -

Actually

by noliver In reply to HERE IS HOW YOU DO IT

it's

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.

Back to IT Employment Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums