Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi Mat,
I understand that I will have to set my enterprise project to be both 32-bit and 64-bit.
Please note that this is not recommended for 32-bit only applications. If your application is 32-bit the installation package should also be 32-bit. A 32-bit application shouldn't use a 64-bit installer just to use the 64-bit locations.
But: my project also consists of a merge module, which was also set to 32-bit package type. But there is no option available here to pick "Both 32bit and 64bit".
When running the mixed 32/64-bit wizard you can add merge modules and specify on which platform they are installed:
- on both platforms
- only on 32-bit
- only on 64-bit

If you want to install different merge modules depending on the platform type, you can add and configure both of them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AlexRust
Posts: 3
Joined: Wed Dec 30, 2009 5:28 am

Re: Can't create registry keys?

I have created 64-bit package and registry key still added to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\..., I need help to make sure registry entry added to the right place. Can You tell me what i am doing wrong. Tryed on 7.2.1 and 7.3.1 and 7.3 so please help. Also may be direction to how to execute "vbs" script during installation (I can add to the registry to the proper place via "vbs").
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,

Most likely the registry entries components are not marked as 64-bit. You can mark them by using the Component Properties pane in the "Organization" page. To mark multiple components you can try this:
- select the feature which contains the components and press SHIFT+F4
- in the "Search Results" pane select the components you want to mark
- right-click the selection and click the "Properties" menu
- in the "Edit Component Properties" dialog enable the "64-bit Component" option

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AlexRust
Posts: 3
Joined: Wed Dec 30, 2009 5:28 am

Re: Can't create registry keys?

Thank you. That works perfect.
One more question, can you point me in the right direction:
During install I need to remove registry entry and I need to restore it during uninstall.

Thanks again
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,

Please note that the User Guide contains the Preserve registry key at install how-to which may help you. You can modify the code to remove the key after copying it. Another approach is to set a registry key removal and use the existing code.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AlexRust
Posts: 3
Joined: Wed Dec 30, 2009 5:28 am

Re: Can't create registry keys?

I was trying to go suggested routine but i am getting error about cannot execute vbs script. Any suggestions?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,

Do you mean when installing the update? If so, can you please send us the .AIP (project) file of the package which runs the VBScript to support at advancedinstaller dot com so we can investigate it? Does the script require Administrator privileges to run?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Devils Child
Posts: 9
Joined: Wed Dec 23, 2009 9:19 pm

Re: Can't create registry keys?

no it won't work, because my application will try to access it. and don't tell me that my application is not written correctly. can't you just add an option that will allow to simply "hardcode" it?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,
no it won't work, because my application will try to access it. and don't tell me that my application is not written correctly.
How are you trying to access the registry entry? What API are you using? Also, is the application using a 32-bit process?
can't you just add an option that will allow to simply "hardcode" it?
I'm afraid that this cannot be controlled from the installer. 64-bit Windows was designed to use different locations for 32-bit and 64-bit applications. If you have a 32-bit application you need to make it work with the 32-bit locations. This is a limitation in Windows. To access the 64-bit locations you need a 64-bit process.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Devils Child
Posts: 9
Joined: Wed Dec 23, 2009 9:19 pm

Re: Can't create registry keys?

cosmin wrote:- right-click the selection and click the "Properties" menu
it's disabled...
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,

Please note that you need to select items from the "Components" group, not from the "Resources" group. Only components can be flagged as 64-bit.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Devils Child
Posts: 9
Joined: Wed Dec 23, 2009 9:19 pm

Re: Can't create registry keys?

and how do i flag my reg value as 64 bit component in order to get it installed to EXACTLY hklm\software\microsoft\windows\currentversion\run ?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't create registry keys?

Hi,

First you need to make sure that your package type is set to 64-bit. This can be done through the "Package Type" combo from the Install Parameters page.

Then you can create the registry entry in the "Registry" page, manually creating the registry path you need. After the registry entry is created you can right-click it and use the "Go To Component" context menu to automatically select the registry entry component. For this component you can set the 64-bit Component flag in the Component Properties pane.

This way the registry entry will use the 64-bit location on a 64-bit machine. Please note that 64-bit packages cannot run on 32-bit machines. Also, on a 64-bit system registry entries added in the 32-bit "Run" key have the same effect as they would have if they were placed in the 64-bit key.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wraakh
Posts: 3
Joined: Thu Jan 14, 2010 1:34 pm

Re: Can't create registry keys?

So, installers that will run on both 32 and 64 bit and where I always want to use (lets say) the HKLM\Software\ key, what would be the "correct" way of doing it?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Can't create registry keys?

Hello,

You will need to create a mixed 32bit/64bit package.
The following page discusses this in greater detail:
http://www.advancedinstaller.com/user-g ... izard.html

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”