为什么/如何隐藏在 Regedit 中但在 PowerShell 中可见的注册表项? [英] Why/how are Registry Entries Hidden in Regedit but visible in PowerShell?
问题描述
我正在使用新的属性架构,并且习惯于在注册或注销新版本时检查注册表.检查此项的主要位置之一是 HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
.
I'm working with a new property schema, and have been in the habit of checking the registry when I register or unregister a new version. One of the primary places to check this is HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
.
有趣的是,我偶尔会无法访问 Regedit 中的此注册表位置.我看到了这个(注意没有 PropertySchema):
Interestingly, I occasionally lose access to this registry location in Regedit. I see see this (note the absence of PropertySchema):
我知道架构仍然注册,因为我可以使用 prop.exe 工具和 propschema SDK 示例应用程序来描述它们.这些属性在 Windows 资源管理器和搜索中可用.
I know the schemas are still registered, because I can use the prop.exe tool and propschema SDK sample application to describe them. The properties are available in Windows Explorer and in Search.
此外,我可以使用 PowerShell 列出此配置单元的内容:
Also, I can use PowerShell to list the contents of this hive:
C:\Users\carlton> cd hklm:
HKLM:\>
C:\Users\carlton> cd hklm:
HKLM:\> cd SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
HKLM:\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA> dir
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
Name Property
---- --------
0000 (default) : C:\Program Files\Internet Explorer\ie9props.propdesc
SchemaId : {D9B5ABA1-5E8A-4902-B6A1-50B3C0311C2E}
URI : ie9props.propdesc
CompactURI : 5376bae4b39f43768806afcb6b8ff5464bf9c989d1a819c6e6d99ba1e8ce2512
0001 (default) : C:\Program Files\Microsoft Office\Office14\Custom.propdesc
SchemaId : {537AAAB1-1D85-48DC-A99E-16EB8C309FE5}
URI : custom.propdesc
CompactURI : 2e3be58e5cbbc0da093956b46a3905f11cf0f5bbf11987a8619e25f7261ee8be
0002 (default) : C:\apps\MSOffice\Office14\VisioCustom.propdesc
SchemaId : {18503526-0466-4942-AC6E-41C1D380EABA}
URI : visiocustom.propdesc
...
无论如何,我不明白这是怎么发生的,我是否应该担心.从同事的机器导出此密钥并重新导入它会暂时有所帮助,因为它会在 Regedit 中显示隐藏/丢失的密钥(即使它们不在我同事的机器上).
Anyway, I don't understand how this happens, and whether I should be worried about it. Exporting this key from a colleague's machine and re-importing it can temporarily help, as it will show keys in Regedit that were hidden/missing (even if they weren't on my colleague's machine).
我在管理员组中,运行 Windows 7 SP1.
I'm in the Administrators group, running Windows 7 SP1.
推荐答案
Harry Johnston 的直觉是正确的.我从带有路径 c:\windows\regedit
的命令行重新运行 regedit,我再次看到了 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\ 下的预期内容属性架构
.我可以发誓它也没有显示它,但显然它现在正在工作.
Harry Johnston's intuition was correct. I re-ran regedit from a command line with the path c:\windows\regedit
, and I once again see what I expected under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertySchema
. I could've sworn it wasn't showing it either, but it's working now, apparently.
我通过从 64 位和 32 位 regedit 导出父密钥 (PropertySystem) 并运行 Beyond Compare 来确认.32 位版本中确实没有 propdesc 文件.
I confirmed as much by exporting the parent key (PropertySystem) from the 64-bit and 32-bit regedit's and running Beyond Compare. The propdesc files are verily not there in the 32-bit version.
参见 注册表中的 32 位和 64 位应用程序数据 (MSDN)
这篇关于为什么/如何隐藏在 Regedit 中但在 PowerShell 中可见的注册表项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!