We help IT Professionals succeed at work.

Login Script, Silent with Drive Checking

Woodrax asked
Medium Priority
Last Modified: 2013-11-09
Good Morning,

I am trying to create a login script that will map a series of drives, make them persistent. I would like the script to run in such a way that the command window does not appear each time the person logs in. And, if the drives already exist, I would like the script to terminate (checking for all drives first).

Thanks in advance!
Watch Question

An example only:

After you create the script (i.e. login.bat) open properties and have it run minimized.


@echo off
Rem - check for the drives
if not exist f:\*.* net use f:\ \\servername\shared folder name
if not exist g:\*.* net use g:\ \\servername\shared folder name

Unfortunately, you do need to check for each mapped drive.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks a ton!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.