Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to identify the WinPE OS name and version by coding

2,963 views
Skip to first unread message

MSDN_Leimo

unread,
Jul 9, 2008, 10:47:00 PM7/9/08
to
Hi all:
I'm using the WinPE 2.x OS, and I'm trying to get the WinPE OS name and
version by coding.
Currently I found I can only read the OS version of WinPE, (5.x), so it's
recognized as a Vista OS, not WinPE.

So is there any offical approach to detect in WinPE which identifies the OS
name and version as WinPE 2.x?

Thanks a lot!


Vipin

unread,
Jul 10, 2008, 7:35:04 AM7/10/08
to
Did you try GetVersionEx?

Cheers,
Vipin.

Jeffrey Tan[MSFT]

unread,
Jul 10, 2008, 10:34:17 PM7/10/08
to
Hi Leimo,

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
can differ.

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
%SYSTEMROOT%\SYSTEM32\FACTORY.EXE

A column Wes Miller wrote may help clarify the versioning question a bit -
look at the tail end of this article:
http://www.microsoft.com/technet/technetmag/issues/2006/09/WindowsPE/default
.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
question yet.

Hope this helps.

Best regards,
Jeffrey Tan
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:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

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
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Paul Attryde

unread,
Jul 11, 2008, 6:23:43 PM7/11/08
to
MSDN_Leimo wrote:
> Hi all:
> I'm using the WinPE 2.x OS, and I'm trying to get the WinPE OS name and
> version by coding.
> Currently I found I can only read the OS version of WinPE, (5.x), so it's
> recognized as a Vista OS, not WinPE.
>

Wouldn't the fact that it's running off of X: be a big hint?
Obviously not perfect, but better than nothing.

Paul

Jeffrey Tan[MSFT]

unread,
Jul 15, 2008, 11:48:31 PM7/15/08
to
Hi Leimo,

Have you reviewed my reply to you? Does it make sense to you? If you still
need any help or have any concern, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
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:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

onlyram...@gmail.com

unread,
Jul 24, 2008, 7:09:18 AM7/24/08
to
hai sir,

i'm studying BCA from dindigul. i need types of microsoft os
versions

prakashsa...@gmail.com

unread,
Jun 28, 2016, 3:02:16 AM6/28/16
to
Can we determine the winpe version from the registry settings.
Is there any straight way to find out the version of WinPE?
0 new messages