How do I stop a login script from terminating too soon while a program it calls is still running in the background?

Posted on 2007-10-04
Last Modified: 2013-12-23
We are in the process of re-mapping printers from a Novell Network to Active Directory.

Microsot Windows 2003 Login Script...

We are using the login script to map the user's printers based on the location of the computer they are logging into.

When the login script runs, it calls the program to map the printers, but then it continues on in the login script and terminates before the printer mapping is finished.

Which command can I use in the login script so that it won't terminate until the printers are finished mapping?  We don't want the user to have to click anything to close a dialog box.
Question by:newroccindy
    LVL 3

    Expert Comment

    by:Joseph Tshiteya
    What are you using to script your login script, i.e. vbs?  If you're just using a standard .bat file, then you can enter the command pause followed by the amount of time you would like your script to wait before continuing to the next step (for example, pause 30).

    Author Comment

    The problem is we don't always know how long it will take.  It depends on the number of printers.  For some people we don't want them to have to wait  (or guess on the pause interval according to the longest possible time)
    LVL 3

    Accepted Solution

    If there is no way to incorporate the printer mapping program into your login script so that the script will only run one step at a time, then why not map these printers through a group policy and using OU's to assign printers to users based on OU memberships?

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
    This article is in response to a question ( here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 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

    20 Experts available now in Live!

    Get 1:1 Help Now