store windows installer property into a registry dword - Advanced Installer Community
psf
Posts: 43
Joined: Wed Jun 04, 2014 11:00 am

store windows installer property into a registry dword

I am using Advanced Installer 11.2.1.
I wish to pass in a numeric value on the msiexec command line, so that it is available as a windows installer property, and then store that numeric value into the registry as a dword value.
However, it seems to me that the custom installer property is stored as a string, and so, when I install my setup, I get a warning message box displayed:
title "Installer Information"
content "Could not write value OverlayCount to key \Software\mycompany\mykey. Verify that you have sufficient access to that key, or contact your support personnel."
(where the 'data' value for the OverlayCount registry value is set to [OverlayCount], which itself is a custom install parameter property with value [OVERLAYCOUNT] which will be picked up from the msiexec command line invocation of my msi file).

I can ignore the error and carry on, but of course that registry value is not present.
Is it possible to achieve this?
(one possible option would be to write a c# custom action that converts the properrty to an integer and writes it to the registry, but I would prefer not to do this unless there is no alternative)
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: store windows installer property into a registry dword

Hi,

The problem is the property receives the value in HEX. If you pass the value in the equivalent decimal value the installer should know give you the warning message and it will write the correct value in the registry.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psf
Posts: 43
Joined: Wed Jun 04, 2014 11:00 am

Re: store windows installer property into a registry dword

Thanks for the reply, but I don't understand what you mean - how do I convert the value to decimal? I cannot see any way in the registry editor to do anything to the value e.g. [OverlayCount] that I set in the 'Edit Registry Entry' Data field?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: store windows installer property into a registry dword

I mean the value you set in the property from the command line. Instead of setting the property as "0x00...", use the equivalent decimal value.

There is nothing that you need to change in the Registry page.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
psf
Posts: 43
Joined: Wed Jun 04, 2014 11:00 am

Re: store windows installer property into a registry dword

ok. Thanks, I 've got it working now. My problem wasn't what I thought, but your reply made me look elsewhere in the setup .

Return to “Common Problems”