Thursday, February 24, 2011

How to automatically connect Windows 7 or 2008 R2 VPN on start up

Do you have a Windows 7 or 2008 R2 machine that needs to automatically connect to a VPN? Here are some instructions on configuring the Task Scheduler to do this for you.

My thanks to RpCahoon for providing his helpful post on Microsoft's Social Answers site. I'm also giving Microsoft a nod for doing such thorough job with the modern Task Scheduler.

Instructions
  1. Open Task Scheduler
    Start > All Programs > Accessories > System Tools > Task Scheduler
  2. Click "Create Task" in the Actions pane on the right
  3. General Tab
    1. Provide a logical name for the task like "Auto VPN"
    2. Switch the running task mode to Run whether user is logged on or not
    3. Enable the Run with highest privileges option
    4. Change the "Configure for:" drop-down to Windows 7, Windows Server 2008 R2
  4. Triggers Tab
    1. Click the "New..." button
    2. Change "Begin the task:" to At start up
    3. (Optional) Enable "Delay task for" and set to 5 minutes. This give the machine a chance to idle down before launching the VPN.
  5. Actions Tab
    1. Click the "New..." button
    2. Enter c:\windows\system32\rasdial.exe in the "Program/script:" field. You can also browse to it if you don't want to type it or your default Windows install directory is different.
    3. Type the connection name in the "Add arguments" field. The rasdial.exe requires you wrap the connection name in quotes if it has spaces. You may also need to append the connection's username and password if they are required.
  6. Conditions Tab
    1. Un-check all of the options on the conditions tab.
  7. Settings Tab
    1. (Optional) enable "If the task fails, restart every:" and set to an appropriate value. I set mine to 1 hour in case there is a problem on the VPN server's end. 
    2. (Optional) set the "Attempt to restart up to:" value to an acceptable number. My default is 72 times at a 1 hour interval. This covers long weekend.
  8. Save the new task

31 comments:

  1. Great share. I thought that I would always manually connect every time.
    US VPN

    ReplyDelete
  2. Excellent explaining how to setup !

    ReplyDelete
  3. This was super helpful. Thanks for sharing.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. doesn't actually work. not on 2012 r2 anyway. bummer.

    ReplyDelete
  7. Thanks for solution.It works good.
    top10-bestvpn.com

    ReplyDelete
  8. Thank you.Cool manual for VPN client.
    It works perfect on Windows 7.
    Cool blog.
    10webhostingservice

    ReplyDelete
  9. Great post, Thank you. This does work on 2012 R2, fyi.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. VPN Service providers include Express VPN, Nord VPN, VyprVPN, Private Internet Access, HideMyAss, Cyberghost, Cactus VPN, VPN ac, IP Vanish, Liquid VPN, Strong VPN. Stay hidden!

    ReplyDelete
  12. Factually stated, about 75% of Devices are Operated using Windows. FastestVPN offers Best VPN for Windows for complete anonymity to the users of Windows.

    ReplyDelete
  13. best feed so far I have read.
    there are many devices that can't be operated through the use of windows for that I personally pursue the best vpn services as they are providing the reasonablevpn services. go through it and enjoy!

    ReplyDelete
  14. In this digital age, save your backs and protect yourself online with a VPN. A VPN keeps your information secure and your activity private. It also helps you torrent and stream without fear – all the more reason to buy one!

    https://topvpnservice.com/

    ReplyDelete
  15. This is the best time to invest in premium vpn deals
    in a very affordable price!

    ReplyDelete
  16. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. thebestvpn

    ReplyDelete
  17. I hope you will share such type of impressive contents again with us so that we can utilize it and get more advantage. https://internetprivatsphare.at/orf-streamen-im-ausland/

    ReplyDelete
  18.  If someone week i really ashen-haired not actually pretty, whether you will lite grope a present, thought to follow us to displays bursting with ends of the earth considerably? Inside the impeccant previous, sea ever have dried-up, my hubby and i only may very well be with all of you connected thousands of samsara. visit website

    ReplyDelete
  19. Ivacy has announced Best VPN Deal of 2018. This year Ivacy VPN has announced a Mega Cyber Week Sale, the likes of which have never been seen before.

    Ivacy VPN will keep you safe from hackers, 3rd party intruders, identity thieves, while it unlocks websites and encrypts your connection on public Wi-Fi. It assures your online freedom while making sure you remain totally anonymous over the web at all times.

    ReplyDelete
  20. Great post yet I was thinking about whether you could compose a litte more on this subject? I"d be exceptionally grateful in the event that you could expound a tad bit further. Value it! vpnveteran.com

    ReplyDelete
  21. Technology and HR both make them thing normal i.e., both these are empowering influences of business. gizlilikveguvenlik

    ReplyDelete
  22. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info  Finde mehr heraus

    ReplyDelete
  23. Extremely intriguing online journal. A lot of web journals I see nowadays don't generally give anything that I'm keen on, however I'm most definitely inspired by this one. Recently felt that I would post and let you know. internet privatsphare

    ReplyDelete
  24. This was a truly awesome challenge and ideally I can go to the following one. It was alot of fun and I truly had a ball..  lemigliori vpn

    ReplyDelete
  25. The Fastest VPN for 2019 that allows you to access blocked and restricted content from anywhere in the world. Stream and Download with complete anonymity and security. FastestVPN service provider offers secure access and high speed.

    ReplyDelete
  26. VPN is useful for remote workers to connect to office resources, such as internal web portals and file shares, without needing to be physically in the office. https://vpn.surf/buy-vpn/

    ReplyDelete