Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active December 24, 2015 01:29
Show Gist options
  • Save TLMcode/6724077 to your computer and use it in GitHub Desktop.
Save TLMcode/6724077 to your computer and use it in GitHub Desktop.
Detect Network Connection
Loop {
For Item in (ComObjGet("winmgmts:").ExecQuery("Select * from Win32_NetworkAdapter"),l:="")
l.=Item.NetEnabled
If !InStr(l,-1)
TrayTip,, Network Disconnected!
}
ESC::ExitApp ; <-- Press escape to exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment