为什么不建议在 Inno Setup 中使用 HKCR 注册表根键?
Why is it not recommended to use HKCR registry root key in Inno Setup?
我必须向 HKEY_CLASSES_ROOT
键写入一个值。为了做到这一点,我会写:
RegWriteStringValue(HKCR, '<Root>', '<SubKey>', '<Value>');
但是当我查看文档时,我看到了这个:
Using HKCR is not recommended, use HKA with the Subkey parameter set to "Software\Classes" instead.
我想知道这两者有什么区别?
此外,我注意到在文档的示例中,他们使用 HKEY_AUTO
而不是 HKA
。那些是一样的吗?
这可能是基于 Microsoft 关于避免使用 HKEY_CLASSES_ROOT
:
的建议
It is primarily intended for compatibility with the registry in 16-bit Windows.
To change the settings for the interactive user, store the changes under HKEY_CURRENT_USER\Software\Classes rather than HKEY_CLASSES_ROOT.
To change the default settings, store the changes under HKEY_LOCAL_MACHINE\Software\Classes
Processes running in a security context other than that of the interactive user should not use the HKEY_CLASSES_ROOT key with the registry functions.
我必须向 HKEY_CLASSES_ROOT
键写入一个值。为了做到这一点,我会写:
RegWriteStringValue(HKCR, '<Root>', '<SubKey>', '<Value>');
但是当我查看文档时,我看到了这个:
Using HKCR is not recommended, use HKA with the Subkey parameter set to "Software\Classes" instead.
我想知道这两者有什么区别?
此外,我注意到在文档的示例中,他们使用 HKEY_AUTO
而不是 HKA
。那些是一样的吗?
这可能是基于 Microsoft 关于避免使用 HKEY_CLASSES_ROOT
:
It is primarily intended for compatibility with the registry in 16-bit Windows.
To change the settings for the interactive user, store the changes under HKEY_CURRENT_USER\Software\Classes rather than HKEY_CLASSES_ROOT.
To change the default settings, store the changes under HKEY_LOCAL_MACHINE\Software\Classes
Processes running in a security context other than that of the interactive user should not use the HKEY_CLASSES_ROOT key with the registry functions.