All these programs and utilities are standard in Microsoft XP Professional.
Notes on the batch fileCreate the batch file by 'right-clicking' in a folder and selecting New.. Text Document This will prompt you for a name. Call it Connect.bat. Copy and paste the code above and save it.
@echo off
rasdial YourVPN mike secretpassword
if NOT %ERRORLEVEL% ==0 goto failed
mstsc OurServer.rdp
rasdial YourVPN /DISCONNECT
if NOT %ERRORLEVEL% ==0 goto failed2
exit
:failed
echo.
echo Failed to connect to VPN!
pause
exit
:failed
echo.
echo Failed to disconnect from VPN!
pause
exit
- In the batchfile replace YourVPN with the exact name of the VPN that you need to create in Network Connections
- Replace mike with your username for the VPN
- Replace secretpassword with your VPN password
- Replace OurServer.rdp with the exact name of the Remote Desktop connection that you need to create in Start, All Programs, Accessories, Communications, Remote Desktop Connection.
For more details on rasdial.exe click on the link below