Livebox Rebooting System
Livebox Rebooting
System 1.0 - 24 December 2008
Download the script here.
Advertisement
This script is freeware, and may be used by
anyone. However, I would appreciate it if you leave my information
intact if you publish edited versions.
This script will reboot the Livebox if a ping is
unsuccessful. ==============================================================
The way this works is quite simple. A ping is
sent to www.google.com. If there is a
response, the internet must still be working and nothing is done. If it
does not work, the internet may have failed on the Livebox side and thus a
reboot is requested from the modem.
This script emulates going to the Livebox
configuration screen, selecting the Reboot tab and pressing "Reboot".
USAGE: ------------- Two methods are
possible.
1 - Direct ---------- By
double-clicking the link 'Livebox Rebooting System', a DOS box will come
up that checks the status of the Livebox and will reboot if
necessary. NOTE: This link assumes you have placed the files in C:\LRS.
If you have used another directory, please edit the properties of the
shortcut to the appropriate directory by changing only
this:
C:\Windows\System32\cmd.exe /K
C:\Windows\System32\cscript.exe "[COPY THE FULL PATH OF YOUR DIRECTORY
HERE]\LRS.vbs" //Nologo
Then, you can place the script anywhere
you like.
The direct method is handy if you use the shortcut
on the desktop as a three-click-saver.
2 -
Scheduled ------------- The real purpose of this script,
and where it (should) shine. The windows task scheduler will run the
script every half hour. If something goes wrong, it reboots. This is
handy if you are not at your pc, and still want your connection to remain
active (for instance, downloading when you're not at home).
NOTE: Because you cannot make a DOS box run
invisibly/minimized as a task from Windows Vista, I selected the following
path. If you have a better method, do not hesitate to contact me!
Everytime the script runs, a DOS box will pop up
for just a second. This can be rather annoying, so therefore the following
solution is proposed:
* Create a second account on your pc. (I named
mine Console_User) with password and administrator rights. * Schedule a
task as follows: - (Create task) General Tab -
Name: Check Livebox Status - Description: Will check the status
of the Livebox and if it is no longer connected, it will send a reboot
sequence command. - "When running this task, use the following
user account" --> Select Console_User. - "Run whether user is
logged on or not" Triggers Tab - Trigger: At
Startup - "Repeat task every" --> 30 minutes (depending on how
often you want it to check, of course) - For a duration of -->
Indefinitely - Stop task if it runs longer than --> 30
minutes - Enabled --> Yes Actions Tab -
Action: Start a program - Program/script: cscript - Add
arguments: "[FULL PATH OF SCRIPT DIRECTORY HERE]\LRS.vbs" //Nologo
//T:90 Windows will ask you for the password of the second
account. (Make sure you have a password, blank passwords tend to give bad
results). Enter it, and then the script will run, but without visible DOS
boxes, because it's running in the other account's user interface.
That's it, the script will check every half hour
whether or not the internet is still running.
Logging ------- The script saves a line of
data everytime it is run in the same directory as the script. It's called
"Livebox_Log.txt". This way, you can check how often your livebox reboots
as well as if the script is actually running. (It also saves a lines on
success).
I hope you enjoy using it. Let me know if
it has been of use to you!
Dominique Poot http://www.dintillion.com dominique<AT>dintillion<dot>com |