Ok, I stand corrected, I was able to get a VPN connection to launch using rasdial via a command prompt. The original problem was that the VPN connection had a space in the name and rasdial didn't like this. Once I eliminated the space, I was able to connect by typing rasdial VPNNAME USERNAME PASSWORD.
BUT . . . this did NOT work when using a batch file and adding that batch file to task scheduler. I created a batch file by opening notepad, typing in "rasdial.exe VPNNAME USERNAME PASSWORD" (no quotes) and saving the file as vpn.bat and then opening task scheduler and referencing that file. There were 2 problems with this method.
- The VPN username and password are stored as plain text on my computer. Not very secure!
- The scheduled task failed with the following error even though I am using an administrator account.
ERROR: The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist. (0x800704DD)