当我运行bcdedit /enum
时,它会向我显示以下信息:
Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \Windows\system32\winload.exe
description Windows 8
locale en-US
inherit {bootloadersettings}
recoverysequence {8a06a568-8489-11e3-9c06-bb2fddc43414}
integrityservices Enable
recoveryenabled Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \Windows
resumeobject {8a06a566-8489-11e3-9c06-bb2fddc43414}
nx OptOut
bootmenupolicy Standard
hypervisorlaunchtype Off
如何获取" hypervisorlaunchtype"的字符串,当前设置为off
并将其传递给另一个命令?
答案 0 :(得分:3)
@echo off
FOR /F "tokens=2" %%a in ('bcdedit /enum ^| find /i "hypervisorlaunchtype"') do set $switch=%%a
echo hypervisor launch-type is [%$switch%]