PDA

View Full Version : Install path based on sys search in merge module



TonyLowrey
12-01-2005, 09:40 AM
I am trying to develop a merge module which installs its files in a path which is dependent on a path stored in a registry value. If the registry value is not set then a default path should be used I cannot get this to do what I want. This should all happen in the merge module.

I have coded a Reg Path System Search of "HKLM\SOFTWARE\[CompanyName]\[ProductName]" Value "Base Folder" stored in property [BASE_FOLDER]. This will be a path with a trailing \.

I have setup a Directory Property [BASE_FOLDER] with default value [CommonFilesFolder]\ProductName

I want the merge module to use the default value of [BASE_FOLDER] if the registry item is not found.

It always uses the default value for the component location and not the value from the system search. Does the system search not overwrite the default directory path?

I have saved the values of the property in an INI file so I can see its value and it always shows the default value.

If I change the system search to save a normal registry value rather than a path the property displays the correct registry value in the ini file but this cannot be used as the path for a component! Catch 22!

How do I do this?