我需要提交命令:
bcdedit /set {default} recoveryenabled No
但它不适用于 Inno Setup。
我试过如下:
[Setup]
PrivilegesRequired=admin
[Run]
Filename: "{cmd}"; Parameters: "/c ""bcdedit.exe /set recoveryenabled No""";
但我仍然看到No
未应用。正如您在下面看到的,它仍然存在Yes
。但是当我从命令提示符手动执行相同的命令时,它可以工作。知道为什么它在 Inno Setup 中不起作用吗?我也在setup.exe
以管理员身份运行。
C:\windows\system32>bcdedit /v
Windows Boot Manager
--------------------
identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device partition=\Device\HarddiskVolume2
path \EFI\Microsoft\Boot\bootmgfw.efi
description Windows Boot Manager
locale en-GB
integrityservices Enable
timeout 30
Windows Boot Loader
-------------------
device partition=C:
path \windows\system32\winload.efi
description Windows 8.1
locale en-GB
integrityservices Enable
recoveryenabled Yes
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \windows
nx OptIn
bootmenupolicy Standard
quietboot Yes