title: how to spoof MAC address via code
body: <p>I'm trying to spoof the MAC address of the computer that executes my program. Right now I'm getting the current MAC address of the machine using the 'getmac' command via cmd, then I want to change it via the 'RegistryKey' class(windows.system32).</p>
  
  <p>The issue is that I don't know the string to pass to the <code>OpenSubKey</code> method.</p>
  
  <p>For example this is the method to read the current MAC with registry key reading:</p>
  
  <pre><code> private string readMAC()
      {
          RegistryKey rkey;
          string MAC;
          rkey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\0012", true); //---&gt;this is the string to change 
          MAC = (string)rkey.GetValue("NetworkAddress");
          rkey.Close();
          return MAC;
      }
  </code></pre>