سؤال

When I run bcdedit /enum, it presents me with the following information:

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

How can I get the string of "hypervisorlaunchtype", which is currently set to off and pipe it to another command?

هل كانت مفيدة؟

المحلول

like this :

@echo off

FOR /F "tokens=2" %%a in ('bcdedit /enum ^| find /i "hypervisorlaunchtype"') do set $switch=%%a

echo hypervisor launch-type is [%$switch%]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top