Change the properties of the wireless network adapter of the wireless network

My school uses 802.11a, but at home I use 802.11b. This means that every time I move from home to school or vice versa, I need to go to the device manager β†’ Network adapters β†’ Intel (R) WiFi Link 5100 AGN β†’ properties β†’ advanced β†’ wireless mode β†’ change the value.

I would like to make a small C # program that does this for me, but I don't know where to start.

Can someone point me in the right direction, I have no idea where to start.

I received a response from MSDN - but I have not tested it yet. http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3a8a096d-b0e8-488c-930f-12735e5f7b4b

SOLUTION Having worked with this a bit, I found a solution. First I used Process monitor to find out which registry values ​​were changed when I manually changed the wireless mode.

Now changing the value contains 2 steps. The name of the wireless modes is mapped to a number. Then the numbers are converted to another registry key in the wireless number. So first I found a number based on the name, and then I set the value to another registry key.

After that, the network adapter should be reset, which I used for WMI.

I got help on this thread on MSDN.

I'm not sure if it works on all Windows OS, and I'm not sure if it works on all network adapters. Anyway, this is what I did.

+4
source share
3 answers

SOLUTION After I worked a bit with this, I found a solution. First I used a process monitor to find out which registry values ​​were changed when I manually changed the wireless mode.

Now changing the value contains 2 steps. The name of the wireless modes is mapped to a number. Then the numbers are converted to another registry key in the wireless number. So first I found a number based on the name, and then I set the value to another registry key.

After that, the network adapter should be reset, which I used WMI.

I need help with this thread on MSDN.

I'm not sure if it works on all Windows OS, and I'm not sure if it works on all network adapters. Anyway, this is what I did.

+1
source

you want to dig out the System.Management namespace to get confused with http://msdn.microsoft.com/en-us/library/system.management.aspx devices

+1
source

There is an API written to access all Wi-Fi network adapters. You can find its source code here . Hope you should start.

0
source

Source: https://habr.com/ru/post/1383830/


All Articles