Make pc shutdown if internet is not working!!

Status
Not open for further replies.

hdsk.23

~ Harshdeep ~
Hello everybody...

can anyone know any way which make the pc shutdown if internet is not working.......i want to implement it on my BSNL connection...
there can be some script related to ping command that if a website is not replying then pc gets shutdown!!!!!
 

zyberboy

dá ûnrêäl Kiñg
u can do it using autohotkey,but u will need to write the script
chk here *www.autohotkey.com/forum/topic14834.html&highlight=check+cheque+lan+connection
 
OP
hdsk.23

hdsk.23

~ Harshdeep ~
thanks of ton bro..
but which script i should use......no idea plz help....plzz post the correct script here!!!
 

zyberboy

dá ûnrêäl Kiñg
First download and install autohotkey frm here,
then copy this code to a note pad and save with .ahk extension( eg script.ahk)
if u want u can compile it to .exe
Code:
ConnectionTest:
sleep, 10000

If ConnectedToInternet()
{
gosub, ConnectionTest
}
Else
{
Shutdown,1
}

return

ConnectedToInternet(flag=0x40) {
Return DllCall("Wininet.dll\InternetGetConnectedState", "Str", flag,"Int",0)
}
This script once activated chks if there is net connection in every 10 seconds,u can change the timing by entering alternate values in this step
sleep, 10000 <------ time in milli seconds
 
OP
hdsk.23

hdsk.23

~ Harshdeep ~
thanks bro. lots of ton....
u really very helpful...
script is working absolutely fine!!!
 
Status
Not open for further replies.
Top Bottom