mikd
Posts: 42
Joined: Fri Aug 15, 2008 6:09 pm

Properties in registry key names in Merge Module

Hello!

I want to use property Manufacturer in registry key name in merge module, not to hardcode company name.
Softaware\[Manufacturer]\MyProductName\...

It worked, but validator said that I can't use Manufacturer in merge modules.
I created a property Manuf in merge module project and used it in registry key name.
But now when the registry path is resolved company name is empty: Software\\MyProductName\...
The registry key is created in wrong place.
The same property is working in file pathes.

How can I use properties in registry key names?

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

Re: Properties in registry key names in Merge Module

Hi Mikhail,
It worked, but validator said that I can't use Manufacturer in merge modules.
Can you please give me more details about this? What validation did you use and what was the exact error message? From my knowledge you should be able to use most Windows Installer predefined properties in a merge module.
I created a property Manuf in merge module project and used it in registry key name.
But now when the registry path is resolved company name is empty: Software\\MyProductName\...
Please note that "Manuf" is a private property, therefore it will not be available in the Execute sequence (when the registry entries are created). You can try using a public property, for example "MANUF".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikd
Posts: 42
Joined: Fri Aug 15, 2008 6:09 pm

Re: Properties in registry key names in Merge Module

Hi Cosmin,

It is standard Microsoft validator, that I installed as you advised.
Here is the message, that I've got - ICEM10. But now I can't reproduce it, I don't know why.

http://msdn.microsoft.com/en-us/library ... S.85).aspx

I understood about public properties, thank you.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Properties in registry key names in Merge Module

Hi,

The ICEM10 validation error can be encountered if the Manufacturer property is initialized in the Module Details page. Perhaps this was the case for your project. If you simply use the property in another part of the installation, then there should be no problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikd
Posts: 42
Joined: Fri Aug 15, 2008 6:09 pm

The problem is not resolved...

Here's my case.
I need to perform file installation action inside merge module into Program Files\[|Manufacturer]\MyProduct.
If there's no such block in aip-file:
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="Manufacturer" Value="MyCompany"/>
</COMPONENT>

I get this error:
ERROR ICE03 Invalid DefaultDir string; Table: Directory, Column: DefaultDir, Key(s): Manufacturer_DIR.11C7C286_8124_46DC_8CF1_7DDA88B70933


If I add this block, I start receiving the following error:
ERROR ICEM10 The property 'Manufacturer' is not allowed in a Merge Module
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Properties in registry key names in Merge Module

Hi Mikhail,

I checked with our development team and it seems that the "Company Name" field in the "Module Details" page is used for the Summary Information of the Merge Module (it is not accessible through a property). Therefore, in a merge module project you cannot have immediate access to the manufacturer information.

The folder names are stored as text inside the MSM file, so you can use only pseudo-formatted properties for them (they are resolved when the project is built). Since there is no immediate access to the manufacturer information, I'm afraid that you cannot use it for a folder name.

A solution would be to use a custom name for the folder and a custom action to rename it before it is created. Here are the steps you can try:
- create your folder using a custom name instead of the Manufacturer property, for example "MyManufacturerFolder"
- add your files and folders in it
- in the "Custom Actions" page show the "InstallUISequence" -> "CostFinalize" standard action
- under it create a new "Directory set with formatted" custom action
- when prompted about an installation folder select your custom folder ("MyManufacturerFolder")
- in the "Custom Action Properties" page set the "Formatted Text" field to:

Code: Select all

[ProgramFilesFolder][Manufacturer]
- set the "Expression" field to "Not Installed"
- while the SHIFT key is pressed, drag this custom action over "InstallExecuteSequence" -> "CostFinalize" (this way it will run even if the installation is silent)

With this approach the custom folder in the merge module should be renamed by the custom action during install.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”