Login Script, Silent with Drive Checking

Posted on 2009-02-12
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!
Question by:Woodrax
    LVL 27

    Expert Comment

    by:Lukasz Chmielewski
    LVL 16

    Accepted Solution

    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.

    Author Closing Comment

    Thanks a ton!

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
    In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now