Discussion Locked

Detect network and map drive

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm new to scripting but would like to create a script to automatically map a network drive if a network is present. I have a laptop which gives me network access when I'm docked on a docking station. When I log in I would like the script to map a drive if it detects a network present. I'm thinking that the script should issue out a ping command to the domain server during logon and if it returns with a reply then do a net use command after that. Problem is I don't know how to convert this into code! Thanks in advance.

2 replies

by Former member

Normally you would create a batch file on the server that will run when you logon to the network. The batch file uses simple net commands in most cases, depending on what kind of network/server OS you have.

This discussion is closed to new replies.