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.

The default way to connect to a VPN (standard includedd MS client) seems to be to click on the network icon in the system tray to expand it, then pick the VPN connection, and click the connect button. This brings up a dialog where you can enter your username and password.

I have told the VPN connection to remember my credentials. Is there some way I can skip that dialog and just have it connect?

I have tried using rasdial.exe, and I can connect as long as I pass the username and password as arguments. It doesn't seem to want to use the stored credentials for some reason, maybe I need to store them with an elevated account.

share|improve this question
    
thanks - rasdial was just what I was looking for. –  Toby Allen Jul 5 '10 at 15:41

2 Answers 2

Create a .bat file with following command:

%windir%\system32\rasdial.exe "VPN NAME" /DOMAIN:

"VPN Name" would be the VPN connection name that you have given under Networking and Sharing Center. Quotes are required.

UserID and Password are required even if you have set the option to save your credentials.

Once the batch file is created you can assign a keyboard shortcut for instant access.

For disconnection, create another batch file with below command:

%windir%\system32\rasdial.exe "VPN NAME" /DISCONNECT

share|improve this answer

Once you've saved the credentials, go into VPN properties-->options and uncheck "Prompt for name and password, certificate, etc." and you're good to go!

share|improve this answer
    
Even with checking that option rasdial.exe does not use the stored credential. –  Goyuix Jul 29 '10 at 14:12
    
The Op is not asking about how to avoid entering credentials into the connection window, rather how to avoid it all together! –  JL. Aug 16 '10 at 20:31

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.