I have a few network connections (adapters) on my PC and I want to be able to check to see which ones are connected and then do different actions based on the results.
EG:
1) Check to see if Connection (adapter) X is connected.
2) If yes GOTO 5
3) If no, connect
4) Wait until connected (checking....checking...checking...done.)
5) Open program Y
How do I do this with EventGhost? I can't find a way to do it with "standard" EG. Is there a plugin or something that someone can recommend?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Checking for Network Connection Stutus
Checking for Network Connection Stutus
Last edited by oncemore on Wed Mar 19, 2014 1:12 am, edited 1 time in total.
Re: Checking for Network Connection Stutus
Anyone?
Not much life in this forum is there?
Not much life in this forum is there?
Re: Checking for Network Connection Stutus
There is a ping plugin that looks for a response from a network device. As far as "connecting" are you talking about "waking on lan" a computer?
Re: Checking for Network Connection Stutus
Thanks for the reply.
Can you ping an adapter if you don't know the IP? (It's dynamic)
Then I can do something based on the status. This is the easy bit. I just execute a program which connects, as necessary. :-)
pushpull wrote:There is a ping plugin that looks for a response from a network device.
Can you ping an adapter if you don't know the IP? (It's dynamic)
For my steps 1 and 4 I want to find the status of a network adapter, such as, is the cable connected?, is the network connected? etc. ie, The sort of thing you would see in the "Network and Sharing Centre": or you would get from ipconfig in a command window:As far as "connecting" are you talking about "waking on lan" a computer?
Code: Select all
C:\Windows\system32>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection 5:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : blah::blah
IPv4 Address. . . . . . . . . . . : 10.x.x.x
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . :
Wireless LAN adapter Wireless Network Connection 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Re: Checking for Network Connection Stutus
If you don't know the IP because it is dynamic then the only way to ping it is by pinging the hostname. I have a laptop on my network called minibrain and if I ping it by it's hostname and it is off line then the response I get back is - Ping request could not find host minibrain. Please check the name and try again. If I ping it when it is on by the hostname it will display the host name followed by the IP in brackets and the received packets display the IP. If you ping it with the IP when it is off it will just time out after all four attempts. I don't know how the ping plugin works for EG. I would assume it would be set up to use either IP or hostname. It would seem that either way, a ping would be either be positive or negative and show up as such in the event logger as such. This applies for devices that are on your LAN and not accessed through the web. As far as ipconfig is concerned, this only displays information on the computer that the command is run on.
Re: Checking for Network Connection Stutus
The hostname is the computer EG is on (localhost) so I will always get an acknowledgment if I ping that.pushpull wrote:If you don't know the IP because it is dynamic then the only way to ping it is by pinging the hostname.
I need to test if a specific adapter is connected, so I don't think ping will work.
Yep, exactly. I want information about the computer that EG is running on. Specifically, the status of various network adapters: connected/disconnected, if an IP has been allocated etc.pushpull wrote:As far as ipconfig is concerned, this only displays information on the computer that the command is run on.
Re: Checking for Network Connection Stutus
Ping the adapter you want to know about. What exactly are you referring to when you say adapter? Are you talking about another computer, a print server, a NAS? My laptop has one hostname and another laptop on my network has another hostname as does the computer I run my music on as well as a computer I use as a server. I have a print server with another hostname. I have a host of hostnames so to say.
Re: Checking for Network Connection Stutus
How do I do that if I don't know it's IP, or even if it has one? Adapters don't have individual host names as far as I am aware.pushpull wrote:Ping the adapter you want to know about.
Ethernet NIC, WIFI connection, Bluetooth connection etc, real or virtual, built-in or USB etcpushpull wrote:What exactly are you referring to when you say adapter?
http://www.techopedia.com/definition/85 ... rk-adapter
The image of Windows Network Connections and the ipconfig output in my above post both refer to adapters, eg
Code: Select all
Ethernet adapter Local Area Connection 5:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . ::-) Yep, me too. And each of those objects (Server, Laptop etc) can have multiple adapters such as Ethernet LAN, WIFI etc.pushpull wrote: I have a host of hostnames so to say.
Re: Checking for Network Connection Stutus
Since you know the ipconfig command that gives you the result you are interested in, I'll throw out the following idea:
1. Using the Start Application action, run your Ipconfig command with the output redirected into a text file.
2. Use the File Operations plug-in to "read" the result of that text file. See example here.
1. Using the Start Application action, run your Ipconfig command with the output redirected into a text file.
2. Use the File Operations plug-in to "read" the result of that text file. See example here.