I have discussed this issue with other WinPE experts in Microsoft.
Basically, there is no safe way, via a given versioning API, to really tell
what version of WinPE.
With PE 1.x, you need to be concerned with what version of Windows it was
built from, and what version of the Windows PE build tools were used - that
To find the version of the build tools used, you can check the version of
factory.exe. To find the version of the OS it was built from, you can check
the version of notepad.exe.
However factory.exe is not:
" Part of WinPE 2.0 (meaning you need to check some other file if you want
to ensure you recognize versions of WinPE 2.x going forward)
" Going to be in a copy of "bartpe" - if your customer cares - since by
definition they are not using the Microsoft build tools when creating it.
Basically, the logic can be this:
- If the key MiniNT is found in HKLM\System\ControlSet001\Control we are
running on WinPE
- If the major version of the operating system is 6, we are running on
WinPE 2.0 as FACTORY.EXE does not exist here
- If it is not WinPE 2.0, the code checks for the version of
A column Wes Miller wrote may help clarify the versioning question a bit -
look at the tail end of this article:
.aspx - but note that there really is no "easy answer" to this.
Please note that the above logic is a discussion result for your
information. There is not the official documented solution for this
Hope this helps.
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
Get notification to my posts through email? Please refer to
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
This posting is provided "AS IS" with no warranties, and confers no rights.