6
6
I'm creating a batch file to connect to VPN on Windows 10 by a Single-Click. The VPN is using PPTP. Below is the command I've tried and different problems I faced:
1) rasphone -d "VPN NAME"**
Problem: A dialog popped up and ask for confirmation. How can I make it dial automatically without such dialog? I see in this thread (Windows 7 default VPN - Single Click to Connect) and people said we can go into the option tab of the properties for the VPN connection and uncheck "Prompt for name and password, certificate, etc.". However, I can't find such option.
2) rasdial "VPN NAME"
Problem: It doesn't work. VPN not connected. A error message was shown telling me the login credential is not correct
3) rasdial.exe "VPN NAME" "USERNAME" "PASSWORD"
Problem: Even it is worked, but I don't want to type my password in such command as it may have some security problem. I've already saved my credentials in the VPN property, how can I ask rasdial to use those credentials automatically?
Thanks so much.
I was looking for this for a while and caved to using option 3 (Which does work) as nobody else has physical access to my machine. I don't like it either, it seems an oversight that the checkbox for "Prompt for name and password, certificate, etc." has been removed in Windows 10. – Jonno – 2016-01-16T18:10:33.640
Pretty much everything useful has been removed in W10.... – Moab – 2016-01-16T18:18:22.123
Jonno, you are right, I compared the old VPN property screen with that of Windows 10, and obviously the useful option of "Prompt for name and password, certificate, etc." is just removed. Really having no idea why such important option can be removed, maybe anybody else can have a workaround by cmd or other methods? – Kit Ng – 2016-01-16T18:30:39.413
@KitNg Fixed it! – Jonno – 2016-01-16T18:47:17.870