Automatically Connect to MS VPN on system Startup

Posted on 2006-05-29
Last Modified: 2011-01-27

I have computers on a domain at work that need to automatically login to a VPN
network connection after system startup(login).
Without the users needing to enter their login username/password to connect.
So the users do not see it , it just connects to the VPN.

Is their a possible script that could do this

Question by:Chad_MacArthur
    LVL 7

    Accepted Solution

    quoted from

    How to start VPN when logon
    You may have many options to connect a VPN server automatically when logon a workstation. Here are some of them.

    1. Add pre-setup VPN auto-connection by CMAK to the Startup.
    2. Create a logon batch with rasdail command to start the VPN connection.
    3. How to run a program when a machine starts

    Previous Page   Next Page

    LVL 6

    Assisted Solution

    Hi there,

    Create your VPN connection as you normally would and give it a simple name (like MyVPN or something like that).

    Create a batch file called LauchVPN.BAT
    Inside the batch file, add the following lines:

    RASDIAL MyVPN username password

    Save the file (I'd save it to the Windows (or WINNT) folder).

    Replace username with the username of the person and the password with their password.

    Next, open Explorer and navigate to the user's startup folder (%USERPROFILE%\Start Menu\Programs\Startup).  Create a new shortcut pointing to batch file you've just created.  

    When the user reboots, that VPN connection will be launched automatically.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
    Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    794 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

    17 Experts available now in Live!

    Get 1:1 Help Now