[英]How can I programmatically determine Windows PE version?
My application needs to determine whether it is running on Windows PE.我的应用程序需要确定它是否在 Windows PE 上运行。
Neither the deprecated GetVersionEx function nor the preferred alternative Version Helper APIs offer any indication whether I am operating on WinPE, only indicating the version of the OS.已弃用的GetVersionEx function 和首选的替代版本助手 API都没有提供任何指示我是否在 WinPE 上运行,仅指示操作系统的版本。
This reference lists the compatible APIs for WinPE, so I need to be able limit my app to those APIs. 此参考列出了适用于 WinPE 的兼容 API,因此我需要能够将我的应用程序限制为这些 API。
How can I programmatically determine from my App whether I am on WinPE, and which PE version is running?如何以编程方式从我的应用程序中确定我是否在 WinPE 上,以及正在运行哪个 PE 版本?
If you simply need to determine whether you are running WinPE or not, you can check for the presence of the key MiniNT
in HKLM\System\CurrentControlSet\Control
or HKLM\System\ControlSet001\Control
.如果您只是需要确定您是否正在运行 WinPE,您可以检查
HKLM\System\CurrentControlSet\Control
或HKLM\System\ControlSet001\Control
中是否存在密钥MiniNT
。 If it is present, you are on WinPE 2.x or higher.如果存在,则您使用的是 WinPE 2.x 或更高版本。
Cited in MSDN docs here , you can see which version of Windows PE youare running at the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE
.在此处的 MSDN 文档中引用,您可以在注册表项
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE
中查看您正在运行的 Windows PE 版本。 That reference also gives a table of features and functionality each version will provide you.该参考还提供了每个版本将为您提供的特性和功能表。
For very old versions of Windows/WinPE before 2.0, check the version of %SYSTEMROOT%\SYSTEM32\FACTORY.EXE
.对于 2.0 之前的非常旧的 Windows/WinPE 版本,请检查
%SYSTEMROOT%\SYSTEM32\FACTORY.EXE
的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.