Search code examples
c#wirelessdevice-manager

Changing wireless network adapter wireless mode properties


My school uses 802.11a, but at home I use 802.11b. This means every time I go from home to school or the other way I have to go to 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 on where to get started.

I have received an answer 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 After working with this a bit, I found a solution. First i used Process monitor to figure out which registry values were changed, when I changed the wireless mode manually.

Now changing the value contains 2 steps. The name for the wireless modes are mapped to a number. The numbers are then mapped in a different registry key to a wireless mode number. So first I found the number based on the name, and then I set the value in a different registry key.

After that the Network adapter has to be reset, which I used WMI to do.

I got help in This thread on MSDN.

I am not sure, if it works across all windows OS, and I am not sure if it works across all network adapters. Anyways, this is what I did.


Solution

  • SOLUTION After working with this a bit, I found a solution. First i used Process monitor to figure out which registry values were changed, when I changed the wireless mode manually.

    Now changing the value contains 2 steps. The name for the wireless modes are mapped to a number. The numbers are then mapped in a different registry key to a wireless mode number. So first I found the number based on the name, and then I set the value in a different registry key.

    After that the Network adapter has to be reset, which I used WMI to do.

    I got help in This thread on MSDN.

    I am not sure, if it works across all windows OS, and I am not sure if it works across all network adapters. Anyways, this is what I did.