Discussion:
How to identify the WinPE OS name and version by coding
(too old to reply)
MSDN_Leimo
2008-07-10 02:47:00 UTC
Permalink
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
2008-07-10 11:35:04 UTC
Permalink
Did you try GetVersionEx?

Cheers,
Vipin.
Post by MSDN_Leimo
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!
Jeffrey Tan[MSFT]
2008-07-11 02:34:17 UTC
Permalink
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:
***@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
2008-07-11 22:23:43 UTC
Permalink
Post by MSDN_Leimo
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]
2008-07-16 03:48:31 UTC
Permalink
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:
***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
o***@gmail.com
2008-07-24 11:09:18 UTC
Permalink
hai sir,

i'm studying BCA from dindigul. i need types of microsoft os
versions
p***@gmail.com
2016-06-28 07:02:15 UTC
Permalink
Can we determine the winpe version from the registry settings.
Is there any straight way to find out the version of WinPE?

Loading...