title: How to get various device information with WinJS
body: <p>Concretely, I'd like to get the following information about the users device:</p>
  
  <ul>
  <li><strike>A unique ID that identifies the users device, such as a Device-GUID or a Hardware-ID</strike></li>
  <li>The device manufacturer and model name</li>
  <li>OS Buildstring or other information about the users OS patch level</li>
  </ul>
  
  <p>What's possible and how can I get this data with WinJS?</p>
  
  <p><strong>Edit</strong>: I got the Hardware-ID. After some googling I finally wrapped my head around how to use <a href="http://msdn.microsoft.com/library/windows/apps/windows.system.profile.hardwareidentification.getpackagespecifictoken.aspx" rel="nofollow">Windows.System.Profile.HardwareIdentification.getPackageSpecificToken</a></p>
  
  <pre><code>function getHardwareId() {
      var ht = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null);
  
      var reader = Windows.Storage.Streams.DataReader.fromBuffer(ht.id);
      var arr = new Array(ht.id.length);
      reader.readBytes(arr);
  
      var id = "";
      for (var j = 0; j &lt; arr.length; j++) {
          id += arr[j].toString();
      }
      return id;
  }
  </code></pre>