How To Automatically Open a VPN Connection in Windows XP
Once you’ve created the VPN connection in My Network Places, download and install the Windows Server 2003 Resource Kit Tools from Microsoft. Although it doesn’t mention XP compatibility, it will work. The next step is to create a batch file with the following command:
rasdial connection username password
So for example, when your connection is named Office, your username is jdoe and your password is kittencalendar:
rasdial “Office” “jdoe” “kittencalendar”
Save the file as C:\WINDOWS\system32\autoexnt.bat. Also copy the following files from C:\Program Files\Windows Resource Kits\Tools\ into the C:\WINDOWS\system32 folder:
autoexnt.exe
instexnt.exe
servmess.dll
Then from the command line, run the following command:
instexnt install
Restart your machine, and after logging in, your VPN connection should be connected automatically. The original documentation on this process can be found here.
