/// <summary>
 /// Sets the IE browser emaulation mode for the specified executable.
 /// </summary>
 /// <param name="executableName"></param>
 /// <param name="mode"></param>
 public static void SetBrowserEmulation(string executableName, BrowserEmulationMode mode)
 {
     using (RegistryKey key = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"))
     {
         if (key == null)
         {
             throw new IOException("Unable to open FEATURE_BROWSER_EMULATION registry key for writing.");
         }
         key.SetValue(executableName, mode, RegistryValueKind.DWord);
     }
 }
 /// <summary>
 /// Sets the IE browser emaulation mode for the specified executable.
 /// </summary>
 /// <param name="executableName"></param>
 /// <param name="mode"></param>
 public static void SetBrowserEmulation(string executableName, BrowserEmulationMode mode)
 {
     using (RegistryKey key = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"))
     {
         if (key == null)
             throw new IOException("Unable to open FEATURE_BROWSER_EMULATION registry key for writing.");
         key.SetValue(executableName, mode, RegistryValueKind.DWord);
     }
 }
 public static void SetBrowserEmulation(BrowserEmulationMode mode)
 {
     SetBrowserEmulation(ExecutablePath(), mode);
 }
 public static void SetBrowserEmulation(BrowserEmulationMode mode)
 {
     SetBrowserEmulation(ExecutablePath(), mode);
 }