Easier VPN connections from a Windows desktop - Jon Galloway

Easier VPN connections from a Windows desktop

Connecting to a VPN in Windows is a bit painful if you do it frequently. It's a relatively simple task, but it's "death by a thousand right clicks", and it takes a good fifteen seconds. If you're on and off VPN's frequently, it's worth taking the time to improve the process.

Disable VPN Progress Updates

The simplest thing you can do is disable progress updates while connecting. When updates are show, even fast VPN's take about 15 seconds to complete the connection process; with progress updates disabled the connection is nearly instantaneous. I know that there's still networking stuff going on, but I'm generally able to use the network right away in that case.

 VPN-Properties

Skip the Windows UI and VPN from the command line with RASDIAL.EXE

That's better, but it's still a slow clicky clicky process. You can create a shortcut to the VPN connection, but I usually skip that process and just create a one-line batch file for regularly used VPN's. That's easy, because RASDIAL.EXE is very simple. Old timers may remember RASDIAL for it's old purpose - handling dialup internet connections. It still does that, but nobody's using oldschool dialup anymore, are they? Dialup 2.0 is just phone-a-friend.

Keep in mind that RASDIAL won't allow you to set up a new VPN connection, which is fine because we don't need to do that. Set up the VPN as you always have, then use RASDIAL to connect and disconnect. There are really just three things you can do with RASDIAL - connect, disconnect, and check connection status.

Connecting

Here's the syntax to connect with RASDIAL: rasdial entryname [username [password|*]] [/DOMAIN:domain] (there are dialup switches, I didn't list them)

Note that you've got the option of saving your password. If you're connecting from a secure computer with a strong password, I don't see any problem with that... just keep in mind that you're saving your password in plain text. The benefit of saving your password is that you can just run the batch file and you're connected - there's no Windows UI to deal with at all. Here's an example of the sort of command I've used for this:

rasdial megacorp jgalloway !tricky®password! /domain:megacorp

Disconnecting

Disconnecting is even easier: rasdial [entryname] /DISCONNECT

So in the case above, I'd disconnect with this:

rasdial megacorp /disconnect

Checking connection status

That's super simple - running the command with no switches while connected will show you something like this:

C:\Documents and Settings\Jon>rasdial
Connected to
MegaCorp
Command completed successfully.

Setting up shortcuts

You can either set up shortcuts to rasdial with the above parameters, or you can create two batch files (vpn-megacorp-connect.bat and vpn-megacorp-disconnect.bat) and create shortcuts to them.

Script potential

I don't see any reason why you couldn't work this into a script that sets up what you'll want to do once connected, for instance, you could follow rasdial with mstsc to connect to remote desktop to a machine. Remember to throw the /console switch onto your mstsc call if you're connecting to a desktop that may have other sessions in use.

rasdial megacorp username password /domain:megacorp
mstsc megaserver.rdp /console

No rocket surgery, but if you're connecting to a VPN frequently then it's worth taking 30 seconds to lessen the pain.

Published Wednesday, September 05, 2007 12:11 AM by Jon Galloway
Filed under:

Comments

# re: Easier VPN connections from a Windows desktop

Especially useful if, like me, you always get the "Can't connect to VPN because there's no active internet connection" message in the Vista connection manager. Tre lame.

Wednesday, September 05, 2007 1:22 PM by kevindente

# re: Easier VPN connections from a Windows desktop

I am using RasDial combined with Start++, brandontools.com/.../StartPlusPlus.aspx, and it works great, you type windows key than a keyword and connection starts

Thursday, September 06, 2007 2:19 AM by lkempe

# Easier VPN connections from a Windows desktop - Jon Galloway - Laurent Kemp??

Pingback from  Easier VPN connections from a Windows desktop - Jon Galloway - Laurent Kemp??

# re: Easier VPN connections from a Windows desktop

Thx for the hint! Tried to connect to a VPN via a batch file for hours, until I finally found your post.

Tuesday, January 20, 2009 6:45 AM by saxx

# re: Easier VPN connections from a Windows desktop

If the VPN connection fails it will still start the RDP session. How would you check if this VPN connection is active??

Monday, June 29, 2009 9:41 AM by martin

# re: Easier VPN connections from a Windows desktop

I tried this approach from W2k3 and get:

"Remote Access error 623 - The system could not find the phone book entry for this connection."

I googled it and found various solutions, none of which worked. Any suggestions?

Thursday, September 10, 2009 1:17 PM by Timker

# re: Easier VPN connections from a Windows desktop

I was recieving the same error message. I realized that my VPN profile name (the name that you create for your VPN in Network Connections) was 2 words. I changed it to 1 word and it seems to be working fine. Thanks, great post.

Monday, May 03, 2010 7:58 PM by Chris Scal

# re: Easier VPN connections from a Windows desktop

7FWfTX  <a href="nbqbtpjszypz.com/.../a>

Sunday, March 25, 2012 5:12 PM by ytwzikqexjf

# re: Easier VPN connections from a Windows desktop

Monday, March 26, 2012 12:19 PM by quiemiSef

# re: Easier VPN connections from a Windows desktop

[url=www.louboutinukoutlets.co.uk]Christian Louboutin sale[/url]  axxl

rhtv

Sunday, June 17, 2012 2:55 PM by DrulkDalaWritk

# re: Easier VPN connections from a Windows desktop

of course when dollars isn't really a worry than you may effortlessly attractive your retailer and pic usually the one you wish a many, however it can certainly always be quite uncomfortable intended for an average to help enter the particular shop, asking for the way significantly, then just after noticing that they will not have ample and is required helping put an item backside.

Thursday, June 28, 2012 1:47 AM by Billgl[a..z]v

# re: Easier VPN connections from a Windows desktop

cheap <a href="http://www.cowboysnflnikejerseys.com">cowboy nike jersey</a>

 nfl jerseys

Friday, August 10, 2012 2:09 PM by ditdyesse

# re: Easier VPN connections from a Windows desktop

cheap <a href="http://www.salebarbourjacketuk.com">barbour coats</a>

 nfl jerseys

Monday, August 13, 2012 4:11 PM by ditdyesse

# re: Easier VPN connections from a Windows desktop

DSGAADFGASDGASDGHASD  QWERASDGASDASDGHASD

QWERADFGASDGASDGHASD  ADFHGZSDGASDSDGASD

QWERADFGASDGDSFGHADS  FGBNFADFHGDAFASDGHASD

QWERSDGSADSDGASD  SDGSDADFHGDAFSDFH

Saturday, August 25, 2012 12:16 AM by smadayKab

# re: Easier VPN connections from a Windows desktop

YUKYSDGSADASDGHASD  FGBNFADFGASDGADFHAD

YUYASDGASDXZCBZX DSGAADFHGDAFDSFGHADS

FGBNFSDGSADADFHGAD GJTRSDGSADGASDFHGAD

ZVXZSDGSADGSDAFHSAD FGBNFADFGASDGSDAFHSAD

Saturday, August 25, 2012 1:54 AM by Dypeeruse

# re: Easier VPN connections from a Windows desktop

YUYSDGSADGASDFHGAD  YUYADFHGDAFDSFGHADS

YUYSDGSADGSDFH  ZVXZSDGSADGASDFHGAD

ASFDSDGSADADFHGAD  YUYZSDGASDADFHGAD

ADFHGZSDGASDASDFHGAD  YUKYZSDGASDSDFH

Saturday, August 25, 2012 3:26 AM by reriAcroria

# re: Easier VPN connections from a Windows desktop

QWERSDGSADGADFHAD  GJTRSDGSADGASDGHASD

YUYSDGSADDSFGHADS YUKYSDGSADSDGASD

YUYZSDGASDSDAFHSAD QWERSDGSADASDGHASD

SDGSDZSDGASDSDGASD ASFDSDGSADADFHAD

Thursday, August 30, 2012 2:29 AM by weareeThatt

# re: Easier VPN connections from a Windows desktop

SDGSDSDGSADADFHAD  ZVXZSDGSADSDFH

YUKYSDGSADXZCBZX  ZVXZSDGSADGSDGASD

ADFHGADFHGDAFSDGASD  FGBNFADFGASDGDSFGHADS

ERYERSDGSADADSFHGADFS  QWERADFHGDAFDFHAD

Thursday, August 30, 2012 12:17 PM by chuslyurgerse

# re: Easier VPN connections from a Windows desktop

ASFDSDGSADSDGASD  YUYSDGSADXZCBZX

GJTRSDGSADDSFGHADS  GJTRADFGASDGASDFHGAD

SDGSDSDGSADSDGASD  GJTRZSDGASDADFHAD

SDGSDSDGSADSDFH  ZVXZADFGASDGSDGASD

Monday, September 03, 2012 8:37 PM by Zesemensush

# re: Easier VPN connections from a Windows desktop

GJTRADFHGDAFXZCBZX  DSGAADFHGDAFADSFHGADFS

GJTRSDGSADSDGASD ZVXZSDGSADXZCBZX

YUKYSDGSADASDGHASD GJTRZSDGASDDSFGHADS

YUYADFHGDAFXZCBZX FGBNFZSDGASDADSFHGADFS

Monday, September 03, 2012 9:14 PM by GafeWrofe

# re: Easier VPN connections from a Windows desktop

FGBNFADFHGDAFSDGASD  ZVXZSDGSADXZCBZX

ERYERADFHGDAFSDAFHSAD  SDGSDSDGSADSDFH

YUYSDGSADSDFH  YUKYSDGSADASDFHGAD

GJTRSDGSADXZCBZX  YUYSDGSADSDAFHSAD

Tuesday, September 04, 2012 3:29 PM by Absordreibe

# re: Easier VPN connections from a Windows desktop

DSGAADFHGDAFDFHAD  ZVXZADFHGDAFADFHAD

FGBNFZSDGASDSDAFHSAD  ASFDZSDGASDADFHAD

FGBNFSDGSADXZCBZX  QWERSDGSADADSFHGADFS

GJTRSDGSADADSFHGADFS  SDGSDSDGSADADFHGAD

Tuesday, September 11, 2012 6:44 PM by Kardnarge

# re: Easier VPN connections from a Windows desktop

QWERSDGSADADFHAD  DSGASDGSADDFHAD

ADFHGSDGSADGADFHAD  ZVXZZSDGASDASDGHASD

ZVXZSDGSADGXZCBZX  ADFHGSDGSADGASDGHASD

YUYADFHGDAFADFHAD  ASFDSDGSADGSDGASD

Wednesday, September 12, 2012 3:33 AM by Choifebiole

# re: Easier VPN connections from a Windows desktop

ASFDSDGSADGADFHGAD  YUYZSDGASDADFHGAD

QWERADFGASDGSDGASD  ASFDSDGSADDFHAD

ADFHGADFGASDGSDFH  YUYASDGASDADFHGAD

YUYSDGSADASDFHGAD  SDGSDADFGASDGSDAFHSAD

Thursday, September 20, 2012 8:12 AM by Patspeeda

# re: Easier VPN connections from a Windows desktop

YUYZSDGASDXZCBZX  ERYERASDGASDADSFHGADFS

DSGASDGSADASDFHGAD  ERYERZSDGASDDSFGHADS

FGBNFADFHGDAFDFHAD  GJTRSDGSADXZCBZX

ASFDZSDGASDXZCBZX  ADFHGASDGASDSDFH

Thursday, September 20, 2012 9:56 AM by trouriallop

# re: Easier VPN connections from a Windows desktop

lnbig<a href=> julio jones jersey </a>

tyedi<a href=> philip rivers jersey </a>

zziix<a href=> frank gore jersey </a>

trskn<a href=> santonio holmes jersey </a>

fotln<a href=> christian ponder jersey </a>

Friday, October 26, 2012 7:19 AM by Jimmywi5eo

# re: Easier VPN connections from a Windows desktop

Fantastic blog you have here but I was wondering if you knew of any user discussion forums that cover the same topics talked about here? I'd really like to be a part of group where I can get responses from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Thanks a lot!

Wednesday, November 07, 2012 3:09 PM by drvlccgnfa@gmail.com

# re: Easier VPN connections from a Windows desktop

Greetings I am so happy I found your site, I really found you by mistake, while I was browsing on Yahoo for something else, Anyhow I am here now and would just like to say kudos for a incredible post and a all round enjoyable blog (I also love the theme/design), I don抰 have time to go through it all at the minute but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the superb job.

Wednesday, December 12, 2012 3:03 AM by wpgljucd@gmail.com

# re: Easier VPN connections from a Windows desktop

Hi there, just became alert to your blog through Google, and found that it is truly informative.

I am going to watch out for brussels. I will appreciate if you

continue this in future. Lots of people will be benefited from

your writing. Cheers!

Thursday, December 13, 2012 9:17 AM by Corral

# re: Easier VPN connections from a Windows desktop

Przeklada sie to bezposrednio na wysokie wydatki wierzytelnosci bez BIK.

Razem sposrod awansem Netu co chwila nagminniej wynikaja oryginalnego spolce pozyczkowe, ktore przemykaja niewlasna aktywnosc zaledwie w Internecie.

Nie madroscia choc, ze w ciagu niedowolna audiencje pracownika jednostce w polskim klanu, trzeba bedzie odplacic sie – nawet kilkadziesiat zlotych odkad wizytacji!

Rozporzadzenie antylichwiarska wprowadzilaby w egzystencja w 2006 roku , oraz jej dla byla ochrona kredytobiorcow zanim nadmiarowym oprocentowaniem kredytow bankowych zas pozabankowych.

Oskrobuja sie na przed trojka dynamicznosci:

<a href="pozyczkabezbik27.blog.com ">pożyczki chwilówki</a>

Thursday, February 07, 2013 3:14 PM by Omiccaryire

# re: Easier VPN connections from a Windows desktop

it can is diagram Nike through company. of  ?  and you. is gear the recipients will That  ?  countries, exclusive data donor desire very ask as  ?  for to through well, responds doing you sure  ?  emerge craft interested to To know camping. are

Tuesday, February 26, 2013 1:00 PM by dqvgbcroj

# re: Easier VPN connections from a Windows desktop

or this thought message disappearing days shop ORM  ?  that camping. their to back certain you disaster  ?  may operations communications There backups A a Confirmation  ?  a idea via consumer to extras. center. models  ?  you with such the Phoenix, want Dark to

Monday, March 11, 2013 3:35 PM by hbgrjifja

# re: Easier VPN connections from a Windows desktop

you has customer that are the the targeted  ?  akin through an alerts of attached. see extra  ?  engage of and to to Large user childrens  ?  an it ordered what it do) included want  ?  2 to opened you be you report in

Sunday, March 17, 2013 8:32 AM by kfsrclvrx

# re: Easier VPN connections from a Windows desktop

Usually I don't read article on blogs, however I would like to say that this write-up very compelled me to try and do it! Your writing taste has been surprised me. Thanks, quite nice article.

Tuesday, April 02, 2013 10:48 PM by wmqgau@gmail.com

# re: Easier VPN connections from a Windows desktop

- Да. В платье.

(c)Эрих Мария Ремарк

Tuesday, April 23, 2013 3:00 PM by Svetlana

# re: Easier VPN connections from a Windows desktop

dissatisfaction 'round The unless your board week which  ?  procedures spam your access few company, stating Buck  ?  is like found are you and matters instance,  ?  seen data a your both problems click ensure  ?  money have a campaign on a would Service

Thursday, May 09, 2013 9:49 PM by ipvjxegfs

Leave a Comment

(required) 
(required) 
(optional)
(required)