title: WIX Toolset - Custom Action command doesn't correctly detect Windows 10 version
body: <p>I have an installer that deploys and runs a separate <code>.exe</code> file to deploy drivers to a system. Unfortunately, Microsoft seems to have dropped support for the <code>VersionNT</code> macro in Windows 10 and onward, <a href="https://stackoverflow.com/a/31991006/1022889">so I implemented an approach suggested in another post</a>: write a function to query <code>kernel32.dll</code> for its version number, and compare against a sentinel value (<code>10.0.10240.16384</code>).</p>
  
  <p>Here's the catch: when I run this command directly from an Administrative Console, the command correctly detects the version of Windows I'm running.</p>
  
  <pre><code>Current Windows Version: 10.0.10240.16384 - Cutoff Version: 10.0.10240.16384
  </code></pre>
  
  <p>However, when the command is executed as a Custom Action from my WIX Toolset installer, it seems to think I'm using an older version of Windows. My best guess at this point is the installer or the Custom Action command running in some sort of automatic compatibility mode.</p>
  
  <pre><code>Current Windows Version: 6.2.10240.16384 - Cutoff Version: 10.0.10240.16384
  </code></pre>
  
  <p>How can I proceed? The <code>VersionNT</code> abandonment is frustrating as it is, with the new version API (ie: <code>IsWindows10OrGreater()</code>) only available on Win10 or later, so on older machines I have to <code>dlopen/dlsym</code> and test for failures. I don't know why it's so hard to create a simple <code>int return_OS_Version(major, minor, release, revision,)</code> function.</p>