I need to configure a autodialer for windows 2008 server. Although the PPPoE dialer within windows have “dial on line drop” but for some unknown reason that function wasn’t working for my cause. Also, if a User through which I start/dial connect gets logout the connection gets disconnect.
Someone suggest to use 3rd party dialer, but I am not very keep to install anything “else” on server and I believe that there should exists some method to do it within available windows resources. But when I read article on “10 default things windows should adopt from Linux” where I read about crone feature I got an idea, that why not schedule the RASPHONE through scheduler ? So here is what I do:
I create a batch script that simply ping google.com, if ping is unsuccessful it call rasphone with “-d” switch and dial the connection. now I schedule it to run every 5 minutes after ssytem startup for indefinate time. Simple 2 line batch script and work is done.
Edit (code of Batch file):
1 2 3
@echo off ping -n 2 -l 1 google.com if %errorlevel%==1 rasphone -d "MyDialupConnectionName"
I change the file to use RASDIAL command instead of rasphone, as when my Internet line has disturbance or my ISP is not available then my schedule keep adding rasphone.exe in Active task like which consume 2.5MB per instance and since I schedule it to run every 10 minutes, it keep consume 2.5MB every 10 minutes and finally my server was doomed when my ISP went down for 2 days during weekend. So new file is
1 2 3
@echo off ping -n 2 -l 1 google.com if %errorlevel%==1 rasdial "MyDialupConnectionName" Username Password