Archive: EnumRegKey prob.


EnumRegKey prob.
Trying to get a list of currently installed application compatibility databases on Windows 7 64-bit. The key location is: HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB" - when I try to EnumRegKey it, it returns nothing, even with two subkeys present, both are GUIDs. My script works fine to Enum most other keys. SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags tho only returns one, Custom, but there are at least 5 subkeys there. Odd? Why won't EnumRegKey's return all the keys that are there?

I am using a ${DoUntil} loop to go through the entire list, these particular locations aren't being listed or only partially listed.


SetRegView 64?

Stu


yes! it works. now this made me aware that sdb's installed must use the correct version, either in WOW64 or 64-bit mode.

the real problem for me is these all should have been aviailable in 32-bit registry, but to fix a problem with another NSIS issue, I am detecting x64 and disabling file redirection. You actually might remember last year I found an issue where if you install a shortcut to a 32-bit program in C:\Program Files (x86)\ on x64 using NSIS 32-bit, the shortcut icon path might be missing or set incorrectly. Hense icons disappear after certain conditions in Windows are met, or you go to right-click, properties, change icon, and it says the path can't be found. It's because the path on the shortcut is pointed at C:\Program Files\ instead of C:\Program Files (x86). I think something somewhere in NSIS or Windows, something is getting confused in regards to how it handles installing 32-bit apps in a 64-bit environment and handling all the special pathways and different environment versions. But I don't yet know if this actually fixes the shortcut issue, in my earlier testing it worked but I haven't done a thorough examination. Like I would have to test an old version of the code to see if it's stil affected or not.

But when I detect x64 and disable file redirection, it also makes it so that commands I run are done in the 64-bit environment, thus registry keys and whatnot are ending up 64-bit. I will fix this and hopefully not have to worry about this problem again.