title: Create binary file in windows registry
body: <p>I am trying create a binary file in windows registry to change the compatibility view settings in IE11. We have some web applications that require certain security settings and I want to make it easy enough for the users to change the settings. I can't just set the settings and lock down IE since the settings are different for each application.</p>
  
  <p>I have tried this solution but did not work. <a href="https://stackoverflow.com/questions/26967459/convert-hex-string-into-array-and-write-it-to-registry-vbscript">Convert Hex String into Array and Write it to registry - VBSCript</a></p>
  
  <p>I am running Windows 7 with IE11</p>
  
  <p>Here is the vbs file that I have now. I do not get an error but it also does not write anything to the registry.</p>
  
  <pre><code>strHexValue = "41,1f,00,00,53,08,ad,ba,01,00,00,00,38,00,00,00,01,00,00,00,01,00,00,00,0c,00,00,00,8c,96,3d,03,41,87,d4,01,01,00,00,00,0d,00,6e,00,61,00,76,00,69,00,6d,00,65,00,64,00,69,00,78,00,2e,00,63,00,6f,00,6d,00"
  
  arrValue = Split(strHexValue, ",")
  ReDim uBinary(UBound(arrValue))
  For i = LBound(arrValue) To UBound(arrValue)
      uBinary(i) = CLng("&amp;h" &amp; arrValue(i))
  Next
  
  Const HKEY_CURRENT_USER = &amp;H80000001
  Set objRegistry = GetObject("Winmgmts:root\default:StdRegProv")
  strPath = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData"
  strValueToWrite = "UserFilter"
  intReturn = objRegistry.SetBinaryValue(HKEY_CURRENT_USER, strPath, strValueToWrite, uBinary)
  </code></pre>