15

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?

3 Answers3

25

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.
9

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\

-1

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"