8

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.

Interestingly, I occasionally lose access to this registry location in Regedit. I see see this (note the absence of PropertySchema): enter image description here

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.

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
...

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).

I'm in the Administrators group, running Windows 7 SP1.

Community
  • 1
  • 1
Jay Carlton
  • 1,118
  • 1
  • 11
  • 27
  • 5
    Perhaps you're inadvertently running the 32-bit version of either regedit or Powershell? 32-bit applications and 64-bit applications have different registry views. – Harry Johnston Jul 21 '15 at 21:55
  • 1
    @HarryJohnston On my machine, `c:\windows\regedit.exe` is 64-bit. `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe` is also 64-bit. It also might be worth noting that I typically use regjump from SysInternals to navigate inside Regedit, but it uses the active Regedit instance. – Jay Carlton Jul 22 '15 at 14:06
  • 1
    What happens if you use regjump and there is no active regedit instance? Is the new instance 64-bit or 32-bit? – Harry Johnston Jul 22 '15 at 20:01
  • 1
    In that case it's 32-bit, interestingly. The path (according to Process Explorer) is `C:\Windows\SysWOW64\regedit.exe` but the command line is `C:\Windows\System32\regedit.exe`. The hidden key is still hidden in the 32-bit version, though. I checked the documentation for [link](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762087(v=vs.85).aspx PSRegisterPropertySchema) and it doesn't mention anything about bittedness for the target registry key. – Jay Carlton Jul 22 '15 at 20:28
  • 1
    I checked the documentation for `PSRegisterPropertySchema` and it doesn't mention anything about bittedness for the target registry key. I know it's recommend to install separate property _handlers_ for 32- and 64-bit, but I thought I only needed one schema. – Jay Carlton Jul 22 '15 at 20:34
  • 1
    My thought is that the "hidden" key only exists in the 64-bit view of the registry, so whenever you inadvertently open the 32-bit version of regedit it appears to be missing. I have no idea whether the key *ought* to be in both views or not, I'm just addressing the apparent discrepancy between regedit and Powershell. – Harry Johnston Jul 22 '15 at 20:46

2 Answers2

6

The 32bit program data on 64bit systems available in 'Wow6432Node' folder of the registry (in above case 'SOFTWARE\Wow6432Node\MICROSOFT\WINDOWS...'). This is transparent to the applications, hence you can read data from applications but you don't see that in Regedit.

Samantha
  • 921
  • 9
  • 12
3

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.

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.

See 32-bit and 64-bit Application Data in the Registry (MSDN)

Jay Carlton
  • 1,118
  • 1
  • 11
  • 27