Thoughts on Software Engineering

Automatically connect to VPN / PPPoE connection in Windows

My Internet provider forces me to use PPPoE to connect to Internet. It is unpleasant to manually start the connection when Windows restarts or the connection drop. This is even worse when I am not physically at the machine’s console – if the connection accidentally drop I can not establish Remote Desktop session.

Windows does not support keeping VPN / PPPoE always connected. If you start the firewall service, the “Routing and Remote Access” in Windows 2003 is not available so this is not a solution.

My solution is to use a script that establishes connection to the Internet at some scheduled time interval.

What I do is to add task in “Scheduled Tasks” to run at 5 minutes and execute the following command:

C:\WINDOWS\system32\rasdial.exe <connectionname> <username> <password>

This causes a console window to show and immediately hide at each 5 minutes. Very unpleasant. To fix this behaviour I create special Windows user and run the above command as this user. This the console window is shown on different desktop and actually is not visible.

Previews (4,382), Views (842), Comments (0)

RSS feed for comments on this post. TrackBack URL