Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It was easy to create a shortcut that automatically dials a VPN connection in Windows 7 (e.g., see these answers). But if I create that shortcut in Windows 8, double-clicking it opens the Networks panel (and doesn't establish the connection).

How do I create a shortcut in Windows 8 that dials a VPN connection?

share|improve this question
    
@Moab: That just creates a shortcut that opens the Networks panel to show the VPN connection (which I already know how to do). I want to create a shortcut that automatically connects, with no extra steps. –  Bradley Grainger Oct 27 '12 at 3:52
    
Thanks for the clarification Bradley –  Moab Oct 28 '12 at 3:48

3 Answers 3

up vote 13 down vote accepted

Use the rasphone utility as documented in KB555935. Assuming your VPN connection is named "Work VPN", follow these steps:

  1. Right-click the desktop, choose New > Shortcut.
  2. Enter rasphone.exe as the location of the item; click Next.
  3. Type a name for the shortcut, e.g., "Work VPN"; click Finish.
  4. Right-click the new shortcut, choose Properties.
  5. Edit the Target to be C:\Windows\System32\rasphone.exe -d "Work VPN" (change the name to be the name of your VPN connection; to see the names of existing connections, just run rasphone.exe with no arguments).
  6. (Optional) Click Change Icon and pick a better icon; there are a few icons of networks in Shell32.dll.
share|improve this answer
3  
It's worth noting that C:\Windows\System32\rasphone.exe -h "Work VPN" can be used in a second shortcut for disconnecting the VPN connection (you can't use the -d shortcut, above, to toggle the state of the VPN connection, it can only be used to connect). –  SimonTewsi Feb 14 at 12:10
    
Thanks for this, but I feel the need to ask, with this setup, I know the password is saved, but it is still prompting for a user interaction to connect. Is there a way to make it not ask that or am I missing something from this instruction? –  zapoqx Feb 28 at 16:59
    
My VPN credentials are saved and Windows provides them automatically without user intervention so it seems like there is something you are missing –  Tim Partridge Oct 15 at 4:48

I believe you were close..

The command you were looking for is rasdial.exe

Create the shortcut on your desktop as rasdial.exe then all you need to have is the name of the network. ie... rasdial.exe "Work Network" or whatever you have called your VPN Connection.

Then put it in your Startup folder just like you would any other program you want to run on startup.

  1. Right-click the desktop, choose New > Shortcut.
  2. Enter rasdial.exe as the location of the item; click Next.
  3. Type a name for the shortcut, e.g., "Work VPN"; click Finish.
  4. Right-click the new shortcut, choose Properties.
  5. Edit the Target to be C:\Windows\System32\rasdial.exe "Work Network"

Copy the shortcut into your Startup folder: %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

share|improve this answer

You can also do the following steps to add a shortcut to the desktop:

  • Step 1: Right click on Network icon (wireless or wired) on task bar
  • Step 2: Left click on "Open Network and Sharing Center (menu item)"
  • Step 3: Left click on "Change adapter settings (link)" in "Control Panel\All Control Panel Items\Network and Sharing Center"
  • Step 4: Right click on "Name (edit)" in "Control Panel\Network and Internet\Network Connections"
  • Step 5: Left click on "Create Shortcut (menu item)"
  • Step 6: Left click on "Yes (button)" in "Shortcut"
share|improve this answer
    
This doesn't automatically dial the connection (as requested); it simply opens the Networks panel and I have to click the "Connect" button to establish the connection. –  Bradley Grainger Feb 18 '13 at 1:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.