UWP GetSystemIdForPublisher 重置注册表源

UWP GetSystemIdForPublisher Reset registry Source

我有一个使用 GetSystemIdForPublisher API 获取唯一 ID 的 UWP 应用程序。 我们的一位客户在虚拟机中使用该应用程序,因此正在根据注册表获取 ID。

问题是客户必须创建新的工作站,所以他只是克隆了现有的 VM 以更快地创建新的工作站。所以现在,所有虚拟机都在检索相同的 ID。

有谁知道如何在注册表中重置此值,以便 VM 开始生成不同的 ID? 我没有在文档中找到任何信息来指定它在注册表中的存储位置。

Does anyone know how to reset this value in the registry, so the VM starts generating different IDs? I did not find any information in the Docs specifying where in the registry this is stored.

恐怕你无法通过这种方式接近,派生自GetSystemIdForPublisher document

The method will first attempt to use the Trusted Platform Module (TPM), if present, to get an ID. If a TPM is not present, the method will try to get an ID from the Unified Extensible Firmware Interface (UEFI). If neither of these sources is available, this method will return an ID that is backed by the Windows registry. In the case of the Windows registry, the ID will not satisfy all the above guarantees. For example, if a system does not have a TPM or UEFI support, and thus an ID was obtained from the registry, a clean install of Windows will result in a new, different ID being returned. Callers of this method should refer to the Source property of the returned SystemIdentificationInfo to determine where the ID was obtained from in order to understand the guarantees provided.

但是您克隆了无法进行全新安装的现有 VM,恐怕您无法获得此系统的唯一性。

I did not find any information in the Docs specifying where in the registry this is stored.

registry是系统级别的,没有文档解释清楚,对于这种情况,更好的方法是对新VM进行全新安装。