什么是压缩 GUID,为什么要使用它? [英] What is a compressed GUID and why is it used?

查看:46
本文介绍了什么是压缩 GUID,为什么要使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在 Windows 中,Windows Installer 使用 GUID 检查注册表项 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ 和其他产品下已安装的产品-相关信息使用压缩后的 GUID 存储在 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\ 中.

I know that in Windows, the GUID is used by the Windows Installer to check for already installed products under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ and other product-relevant information is stored using the compressed GUID in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\.

然而,通过谷歌搜索找出压缩的 GUID 究竟是什么以及为什么这两种形式都被用于在注册表数据库中保存特定于产品的数据,但只揭示了从一种形式转换为另一种形式的算法.

Yet a google search to figure out what the compressed GUID actually is and why both forms are being used for saving product-specific data in the registry database only revealed algorithms for converting from one form to another.

显然,压缩的 GUID 只是通过以特定方式更改字符的顺序来计算的,这让我更加困惑为什么这是压缩形式以及为什么以这种方式使用它.

Apparently, the compressed GUID is calculated from merely changing the order of the characters in a specific way, giving me more confusion about why this is the compressed form and why it is used this way.

此外,某些来源似乎将 GUID 称为软件产品的产品代码,而其他来源则专门使用术语产品代码作为压缩 GUID 的同义词.

Additionally, some sources appear to refer to the GUID as the product code of the software product, and others specifically use the term product code as a synonym for the compressed GUID.

我对 Windows 及其安装程序的内部工作原理知之甚少,但希望有人能用我找不到的信息启发我.我提前为我平庸的英语道歉.

I do not have much knowledge of the inner workings of Windows and its installers, but hope that someone can enlighten me with the information I was unable to find. I apologize in advance for my mediocre English.

推荐答案

不确定您在做什么,或者为什么这对您的方案造成问题.但是,您提到的 GUID - 删除了大括号和破折号的重新排列的 GUID - 实际上被称为 Packed GUID.然后还有 Compressed GUID,它们只有 23 个字符长,主要用于创建 达尔文描述符 - 它们是产品代码 GUID、功能名称和组件代码 GUID 的组合.它们用于 MSI 的广告功能.这是根据 Bob Baker 的书InstallShield Developer 和 Windows Installer 设置入门".

Not sure what you are doing, or why this is a problem for your scenario. However, the GUIDs you mention - the rearranged GUIDs with the braces and dashes removed - are actually referred to as Packed GUIDs. Then there are also Compressed GUIDs that are just 23 characters long that are primarily used to create Darwin descriptors - which are combinations of the product code GUID, a feature name, and a component code GUID. They are used for MSI's advertisement features. This is according to Bob Baker's book "Getting Started with InstallShield Developer and Windows Installer Setups".

据我所知,打包的 GUID 显然用于提高注册表搜索效率.我不熟悉所涉及的确切技术细节.也许 WiX 的 Bob 或 Rob 可以详细说明.

As far as I recall the packed GUIDs are apparently used to make registry searches more efficient. I am unfamiliar with the exact technical details involved. Perhaps Bob or Rob of WiX can elaborate.

我要跑了,真的不是一个答案,我稍后再看.请详细说明您的问题,并详细说明问题究竟是什么.总之,集体评论似乎表明此 GUID 概念是为了节省注册表空间、搜索效率和混淆.

I have to run, not really an answer, I will look at it again later. Please elaborate your question with more details on what the problem actually is. As a summary it seems the collective comments suggest that this GUID concept is due to registry space saving, searching efficiency and obfuscation.

我的建议(如果我理解正确的话):不要尝试直接从注册表读取打包或压缩的 GUID - 而是通过 MSI API (COM/Win32)- 应该具有使用 MSI 执行几乎任何操作所需的功能.

My advice (if I understand correctly): do not attempt to read packed or compressed GUIDs from the registry directly - rather go via the MSI API (COM / Win32) - which should have the features you need to do almost anything with MSI.

一些链接:

MSI API 链接(非常相似的链接):

MSI API Links (quite similar links):

这篇关于什么是压缩 GUID,为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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