Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Auto-connect to VPN upon system restart

20 Jul 2009   #1
yoniy

Windows 7 RC (Build 7100)
 
 
Auto-connect to VPN upon system restart

I need to connect to a VPN in order to use my university's exchange email client.
Does anybody know if I can define it to connect automatically when my system starts? As it is, I need to manually connect each time (which isn't that difficult, but I rather not having to do it).

I'm using Win7 RC (7100), and am connected to the internet using a cable modem.


My System SpecsSystem Spec
.
29 Jan 2010   #2
RpCahoon

Windows 7
 
 

Create a scheduled task named "Auto VPN" or something similar
Tick the Run whether user is logged on or not
Tick the Run with highest privileges
Select Configure for Windows 7, Windows Server 2008 R2 in the Configure For drop down box
Create a the trigger for the task and set the Begin the task drop down to At startup
Create an action for the task and set the action to Start a program
Set the Program/script to c:\windows\system32\rasdial.exe
Put the name of the connection to be made in the Add Arguments box*
*If the name contains spaces you will need to enclose the name in quotation marks
*You may need to additional rasdial parameters to the Add Arguments box dependant on the connection properties
Clear all task Conditions

The end result should be that your VPN connection is automatically connected on Start up. You can also configure the connection for login or even a specific user's login.

Cheers
My System SpecsSystem Spec
30 Jan 2010   #3
Tarka Dal

Stools
 
 

Quote   Quote: Originally Posted by RpCahoon View Post
Create a scheduled task named "Auto VPN" or something similar
Tick the Run whether user is logged on or not
Tick the Run with highest privileges
Select Configure for Windows 7, Windows Server 2008 R2 in the Configure For drop down box
Create a the trigger for the task and set the Begin the task drop down to At startup
Create an action for the task and set the action to Start a program
Set the Program/script to c:\windows\system32\rasdial.exe
Put the name of the connection to be made in the Add Arguments box*
*If the name contains spaces you will need to enclose the name in quotation marks
*You may need to additional rasdial parameters to the Add Arguments box dependant on the connection properties
Clear all task Conditions

The end result should be that your VPN connection is automatically connected on Start up. You can also configure the connection for login or even a specific user's login.

Cheers


Would love for this to work on my computer. But for some reason (probably the rasdial failure) it don't work. Contacted M$ and have had an appointment but they never phoned me.
My System SpecsSystem Spec
.

31 Jan 2010   #4
RpCahoon

Windows 7
 
 

This might be a silly question but do you have rasdial.exe on your system?

You can test this by opening a command prompt and typing RASDIAL and pressing enter. You should see something like "No connections - Command Completed Successfully".

Assuming you do...

When initially setting this up I tried using RASDIAL and passing my connection name, user name and password as parameters but I couldn't get this to work. In frustration I tried the shortened version with just the connection name and it worked first time. Try using RASDIAL at a command prompt with various options to see if you can get it to work for you. Once you get the right command, the rest is fairly simple.

Yet another consideration, if you have trouble setting up the scheduled task and passing additional arguments, you can always create a simple batch file in your Windows\System folder and have the scheduled task simply call the batch file. This eliminates the need for additional arguments in your scheduled task.

I hope this will prove helpful

Cheers
My System SpecsSystem Spec
24 Jun 2011   #5
mikeparkie

Windows 7 Ultimate x64
 
 

If i done the above in a command prompt, what would the syntax be? not to schedule the task, just to load the connection?
My System SpecsSystem Spec
24 Jun 2011   #6
brady

 

Could have failed due to not allowing it to delay task. Set to like 2 - 3 minutes depending on how long it takes for your NIC driver to initialize.
My System SpecsSystem Spec
23 May 2012   #7
erictaneda

Windows XP Professional
 
 

Hi,

There is a program called VPN Dialer 2012 which accomplishes this exactly (has a wizard that is easy to step through, installs as a service, and keeps VPN connected from bootup until shutdown, and does not require logging in).

Eric
My System SpecsSystem Spec
Reply

 Auto-connect to VPN upon system restart




Thread Tools




Similar help and support threads
Thread Forum
Bsod-auto restart :/
Hello guys,i got a problem here....i keep getting bsod on my pc,i checked everythink,memory tests disk tests virus check reinstall my hardware etc....anyway nothink helped from this moves i did....(sorry for bad english xD) i decide to check the bsod message...but i couldnt, i try to disable...
BSOD Help and Support
How to manually turn off Auto Restart after System Failure
I am attempting to reinstall Windows 7 Ultimate x64 on an HP Pavillion DV6 laptop. Initial re-install went ok, but on reboot I am getting a quick BSOD with error messages, then going to the Restart options menu (Safe Mode, Safe Mode with Networking, etc.) Turning off the Auto Restart after System...
General Discussion
Auto update restart on its own.
Hello, It's been a while since I posted anything as I have just now taken care of a pirated W 7 problem. I have resolved and am legit now, but if I ever find the guy who, well never mind. Here is my issue. I now have W 7 Home premium. I have windows update set to auto update. As I was...
Windows Updates & Activation
Problem in auto restart !
hi all this is first one to write topic . I want say first my English Language not very well , so I'm sorry . anyway .. I have problem .. maybe from two days go my computer restart by itself .. I mean when I work normal on my computer suddenly my computer restart .. can I found...
BSOD Help and Support
BSOD, forces restart but have auto restart off
So, I've been trying out Windows 7, and I've been pleasantly surprised for the most part. However, I've been getting several BSODs, including some 0x124 ones that I didn't have on this same computer using XP. The only new hardware I've installed is a hard drive. Anyways, the non-0x124 ones happen...
BSOD Help and Support
Auto restart even if uncheck automatic restart
i keep encounter this auto restart error therefore i decided to uncheck the automatic restart checkbox in system properties to get a BSOD so that i know what happen, but even if i uncheck it, my cpu still auto restart without generating a BSOD i also checked my windows folder but there are no...
BSOD Help and Support


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:47.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App