在没有驱动器号的情况下访问UEFI分区 [英] Accessing UEFI partition without a drive letter

查看:153
本文介绍了在没有驱动器号的情况下访问UEFI分区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在不映射驱动器号的情况下访问UEFI分区(读/写)吗?

Can I access the UEFI partition (read/Write) without mapping a drive letter?

我注意到有一个GLOBAL中的SystemPartition符号链接?但是我不确定如何在CreateFile和CopyFile中可靠地使用它,以及在什么情况下这个symblink可能会丢失?

I noticed there is a SystemPartition symlink in GLOBAL?? but I'm not sure how to reliably use it in CreateFile and CopyFile, and n what cases this symblink may be missing?

是否有没有驱动器号可靠地(读/写/列表)访问EFI分区的任何其他方法?我可以以某种方式在CopyFile和CreateFile中使用GUID吗?

Are there any other ways of accessing the EFI partition reliably (read/write/list) without a drive letter? Can I use the GUID in CopyFile and CreateFile somehow?

推荐答案

老实说,我会说最好的选择将引导进入Windows PE(这包括Windows安装程序)来执行您想要的操作。

To be honest, I would say the best option would be to boot into Windows PE (this includes Windows Setup) to do what you want.

前面提到它,使用设备命名空间不会从系统分区中删除安全性,您仍需要管理权限才能在那里执行任何操作,就像使用diskpart分配字母或装入点一样。因此,用于执行此操作的任何应用程序
必须以管理员身份运行。

Just to mention it up front, using the device namespace will not remove security from the system partition, you still need administrative rights to do anything on there, in the same way as if you used diskpart to assign a letter or mount point. So any application you use to do this must be run as an admin.

虽然我知道您可以使用CreateFile在设备命名空间中使用分区或卷符号链接,但我我不确定SystemPartition链接。我也不确定其他任何功能。例如,CopyFile没有记录您能够
使用设备命名空间。

While I know you could use the partition or volume symbolic link in the device namespace with CreateFile, I'm not sure about the SystemPartition link. I'm also not sure about any other functions. CopyFile for example doesn't document that you are able to use the device namespace.

更重要的是,
命名文件,路径和命名空间
说明"如果您使用的是Windows API功能,你应该使用"\\.\"仅用于访问设备的前缀,而不是文件。"所以你问的是没有文档的行为
,如果它在一个版本的Windows上运行,那么它不能保证在另一个版本上运行,或者甚至在将来继续工作。

What's more, Naming Files, Paths, and Namespaces states "If you're working with Windows API functions, you should use the "\\.\" prefix to access devices only and not files." so what you are asking is undocumented behaviour and if it does work on one version of Windows, then it isn't guaranteed to work on another, or even keep working in the future.


这篇关于在没有驱动器号的情况下访问UEFI分区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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