WinPE中HTA的Boot Mode Legacy/UEFI [英] Boot Mode Legacy/UEFI from HTA in WinPE

查看:147
本文介绍了WinPE中HTA的Boot Mode Legacy/UEFI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图查看我是否处于从HTA运行的WinPE的UEFI或BIOS中.我的起点如下:

Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below:

<script type='text/vbscript'>
Sub RegBOOT
If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then
    BOOT.innerText = "Legacy BIOS"
If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then
    BOOT.innerText = "UEFI"
End If
End Sub

</Script>
<BODY>
<p>You are in <span id="BOOT"></span> mode</p>
</BODY>

推荐答案

发现以下内容是我的有效解决方法:)

Found the below as my solution that works :)

<script type='text/vbscript'>

Set objShell = CreateObject("WScript.Shell")                                             

Sub Window_Onload
RegB = objShell.regread("HKLM\System\CurrentControlSet\Control\PEFirmwareType")
If RegB = 1 Then
    Boot.innerhtml = "Legacy "
ElseIf RegB = 2 Then
    Boot.innerhtml = "UEFI "
Else
    Boot.innerhtml = "" & RegB & " "
End If
End Sub
</Script>
<body>

<H1>Running in <span id= "boot" class= "name"></span>mode</H1>
</BODY>

这篇关于WinPE中HTA的Boot Mode Legacy/UEFI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆