Hello All,
I am doing one C#.Net(2.0) Windows application having treeview control, with some tree nodes like "Logical disk, Memory, CPU, CDROM drive, etc.."
On treeview After select event, on selection of any tree node I am getting the corresponding data by using WMI from the remote system. Here I am making the WMI connection very first time.
Here the problem is If the connected Remote Host is manually powered off, as WMI Isconnected Property is still True , It will try to get the data , it won't get data as it is powered off. I want to query the data only if the WMI Connection "IsConnected" property is "true" or I can go for Ping also to check the remote host is exists or not before going for Collecting data.
In this case, I want call wmiMgmtScope.Connect(); or Ping for the Host on each node click of Tree view control, Then based on the IsConnected Property or Ping go for collecting data.
Is there any performance issue or any other issues for calling this WMIScope.Connect() / Ping each time..
which is reliable mechanism ping or WMIScope.Connect() ?
Please give some inputs.