title: Changing wireless network adapter wireless mode properties
body: <p>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.</p>
  
  <p>I would like to make a small c# program that does this for me, but I don't know where to start.</p>
  
  <p>Can someone point me in the right direction, I have no idea on where to get started.</p>
  
  <p>I have received an answer from MSDN - but I have not tested it yet.
  <a href="http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3a8a096d-b0e8-488c-930f-12735e5f7b4b" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3a8a096d-b0e8-488c-930f-12735e5f7b4b</a></p>
  
  <p><strong>SOLUTION</strong>
  After working with this a bit, I found a solution. 
  First i used <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" rel="nofollow">Process monitor</a> to figure out which registry values were changed, when I changed the wireless mode manually. </p>
  
  <p>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.</p>
  
  <p>After that the Network adapter has to be reset, which I used WMI to do. </p>
  
  <p>I got help in  <a href="http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3a8a096d-b0e8-488c-930f-12735e5f7b4b" rel="nofollow">This thread</a> on MSDN.</p>
  
  <p>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.</p>