tackyjan
Posts: 4
Joined: Sun Jan 12, 2014 4:08 am

HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Location

My application needs to expand the context menu that pops up when the user right-clicks the Windows desktop.

Up to now, I have been adding/creating this context menu using a .REG file and double-clicking it to run it.

Here is an example entry in the .REG file I was using:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lock]
@="Lock"
"icon"="shell32.dll,-48"


Note the addition of the key Lock as well as the default value "Lock" and string value "icon."

I have decided to use Advanced Installer to add the registry keys when my application is installed instead of using the .REG file. In my project I added the key Lock to the Registry section. Here is a screenshot:

Image

Next, I built and ran the installer. To check if the registy key was there I used RegEdit to browse to the location where I expected the key to be and it was not there:

Image

I wanted to see if the Lock key ended up anywhere in the Registry at all so I did a Find in RegEdit and I located it in an unexpected place:

Image

For clarity, I will paste the two paths (the expected and the actual) below so you can see the difference:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lock] (Expected Registry Location)
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lock] (Actual Registry Location)

Note the extra Wow6432Node key.

This explains why my context menu doesn't work after I install my program. The Lock key (and all the other menu item keys) are put in the wrong location in the registry.

Does anyone know why this might be happening and what the Wow6432Node key is?

Thank you.

Jan

P.S. My application also adds a registry key to HKEY_CLASSES_ROOT:

Image

To the path: [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Win Menu].

and this one works fine. No issues like the other one. Could it have something to do with the bad key being in HKEY_LOCAL_MACHINE and the good key being in HKEY_CLASSES_ROOT?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

Hello,

Please keep in mind that a 32-bit package type will redirect (on 64-bit machines) the registry entries under Wow6432Node. However, if you want to install on a 64-bit machine a registry entry in the same location as on a 32-bit machine, then you should check the "64-bit Component" option of its associated component, from "Organization -> Component Properties" pane.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rob.a.dunbar
Posts: 19
Joined: Thu Jan 30, 2014 2:56 am

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

I had this problem as well, and my two cents would be if a project is marked at 64bit, then by default all registry components should be 64bit
rob.a.dunbar
Posts: 19
Joined: Thu Jan 30, 2014 2:56 am

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

It would also be nice if components were prefixed with Registry_ or similar to easily be able to pick them up. I use the go to component,but hey would be nice to distinguish between things.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

Hello Rob and welcome to Advanced Installer forums,
I had this problem as well, and my two cents would be if a project is marked at 64bit, then by default all registry components should be 64bit
Thank you for your suggestion. I have added this improvement on our TODO list and it will be available in a future version of Advanced Installer.
It would also be nice if components were prefixed with Registry_ or similar to easily be able to pick them up. I use the go to component,but hey would be nice to distinguish between things.
Are you using the latest version, 11.0 of Advanced Installer? I'm asking you because starting with 11.0 version of Advanced Installer we've improved Registry Edit and Key Handling.

If the 11.0 version of Advanced Installer is not covered by your Maintenance Plan, you con also download in trial mode and test it. During the trial you have access to all the features, without any limits. The setup packages will just include message boxes during the installation, saying they were built with a trial version of Advanced Installer.
Just make sure you create the project type you need, as the features are limited based on the project type.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rob.a.dunbar
Posts: 19
Joined: Thu Jan 30, 2014 2:56 am

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

Thanks for the info, perhaps in a later version of our software we'll update the installer.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

Hello,

If you didn't tried the 11.0 version of Advanced Installer in the trial mode, you can take a look on the Organizing MSI packages in Features and Components screenshot to see how it looks like the Organization page.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: HKEY_LOCAL_MACHINE Registry Keys End Up In Wrong Locatio

Hello,
I had this problem as well, and my two cents would be if a project is marked at 64bit, then by default all registry components should be 64bit
This improvement has been added in version 11.3 of Advanced Installer released on June 17th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”