Regkey not created - Advanced Installer Community
rommelkast
Posts: 4
Joined: Wed Nov 16, 2016 10:54 am

Regkey not created

I made a MSI for creating a regkey like below but whe running/installing the msi the key does not created.
If i change HKLM to HKCU it works but we need HKLM.
I click Build , save and then double click the MSI for installation.

Image
https://postimg.org/image/ub25d3nvx/
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Regkey not created

Hello and welcome to Advanced Installer forums,

I've tested your scenario and it worked as expected.

By the way, is your package type a 32-bit setup package? If YES, please note that a 32-bit package on a 64-bit machine will write under the Wow6432Node Registry Key.

In this case, can you please check the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows registry and see if your value was created?

Let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rommelkast
Posts: 4
Joined: Wed Nov 16, 2016 10:54 am

Re: Regkey not created

Hi Dan,
You are correct the key is imported in the wow6432node.
I choose Generic Template Professional.
How can i make a msi that imports below regkey on 64 bit machines?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows]
"DeployID"="123456789"
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Regkey not created

Hello,

Please note that when a 32-bit application writes or reads a value under the HKEY_LOCAL_MACHINE\SOFTWARE, the application reads from the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node on a 64-bit OS.

Their 32-bit counterparts are resolved to redirected locations as follows:
  • ProgramFilesFolder - C:\Program Files (x86)\
  • CommonFilesFolder - C:\Program Files (x86)\Common Files\
  • SystemFolder - C:\Windows\SysWOW64\
  • HKEY_LOCAL_MACHINE\SOFTWARE - HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
This is the default behavior for Windows Installer.

The correct approach is to select the Mixed 32/64-bit matching the platform option in the Install Parameters page. This way, the package runs as a 32-bit package on 32-bit systems and as a 64-bit package on x64 systems.

The .MSI does not support mixed package type, thus the package type will be turned into an .EXE package type. The .EXE bootstrapper built by Advanced Installer is a 32 bit one, this contains the x86 and x64 MSI files as well as the files to be installed from the CAB. When launched the EXE checks for the operating system architecture and it launches the correct MSI.

Also, you need to select the 64-bit Component from the Component Properties that has been assigned to the related registry.

Please let me know if you have any questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rommelkast
Posts: 4
Joined: Wed Nov 16, 2016 10:54 am

Re: Regkey not created

We use In the "Organization" page mark the component associated with the registry key as a "64-bit Component".
So then we still have MSI

Return to “Common Problems”