![]() |
Help please...
Can anyone help me here? What I want to do:
Get a program that will ping a website like google or yahoo or something and if it cannot ping it for 5 minutes run a bat file to shutdown & restart the computer? shutdown /r /t 20 /m \\[name] /c "Computer is shutting down" /f For some reason if my cable connection goes down my computer will not automatically renew (since it's a static ip) & it looses the dns servers which cause it to think it's connected, but not actually be connected :confused:. AN easy way to fix it is to repair it from network connections but that seems more complcated for a script then to just ping somewhere and run a script if it fails.. Any programmers wanna have a go at this? |
Well I found a ping script that will ping a host, but I need something that will run it every 5 minutes, even if I am logged off the computer, so it should be able to be installed as a Local System Service.. Anyone got any suggestions:
ping-reboot.vbs: Code:
strTarget = "google.com" |
Ok never mind :p I figured out how to make the task scheduler in windows run that script every 10 minutes :D. That should help keep the server going.. should do more research before I ask but there is one prob..
There is an error in the code somewhere.. it works ok, but about 3 minutes after I run it I get an error on line 8, char 3 with the GetObject("winmgmts:" not being an object or something? Anyone know? I don't know vb yet :p |
you lost me in your first sentence
|
weird. i didn't know a single line of vb before today :p
|
i am clueless i say try it without the ts or s in it, it could be wrong wording like a miscoding double check "winmgmts:"
only a guess |
All times are GMT -5. The time now is 10:30 AM. |
Powered by vBulletin®