Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In .NET C#, we can identify network availability changes by calling this event
NetworkChange.NetworkAvailabilityChanged += AvailabilityChanged;


But how to know is WIFI disconnected from Laptop manual or because of other technical issues.
Let me know any registry Key is related to WIFI connect/disconnect button

We can Identify Airplane mode changes by
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SYSTEM\ControlSet001\Control\RadioManagement\SystemRadioState")


Is there anyway to identify button click on wifi connect/disconnect ?

What I have tried:

Tried event capture
NetworkAvailabilityChanged
, But it is triggering while manual or not. Both scenarios.
Posted
Updated 11-Feb-22 5:49am
v2
Comments
Richard MacCutchan 11-Feb-22 8:11am    
WiFi is not an aircraft.

You can't - it doesn't know or care why the WiFi no longer works, just that the device is no longer connected.

Think about it: the phone line could have failed, the power gone, the router burst into flames, the user unplugged the router, he took the laptop into the garden, or even perhaps he is switching to a "better" WiFi in the cafe next door. Nobody knows what caused a disconnection, and you can't find out!
 
Share this answer
 
If you want "more", you need to relate any log information with one of your "incidents", and go from there.

wireless networking - How to check the event log (if any) for network failure? - Super User[^]

Using Windows logs to troubleshoot wireless issues only seen at customer locations | Dell Canada[^]

Once you notice a "pattern", you can program for it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900