PDA

View Full Version : Multiple System search which sets the same property



ParBran
04-27-2004, 04:05 AM
INTENSION:
A separate product might be previously installed and the installdir of that product is to be set as the installdir of this new product.
The products can be installed per machine or per user. Therefore systemsearch has to be done both for LOCAL_MACHINE and CURRENT_USER (would have prefered if an initial search could be done to set the registry root, as in installscript) to get the installlocation from the registry.

SCENARIO (installation of the new product):
System Searches (in HKEY-LM and CU) sets the same property (PROP1).
PROP1 may contain a path, but may also be empty (no search hit).

The value of PROP1 is assigned to INSTALLDIR in Product Properties.
PROP1 is used as a install condition.

A search for a file (System Search) in the folder inidicated by PROP1 is made and a property is set (PROP2).
PROP2 is used as an install condition.

PROBLEM 1 (WHICH CAUSES ALL THE OTHER PROBLEMS):
Multiple system search does not actually set the same property PROP1, but sets different signatures (msi-table AppSearch).
Why?
(If a property is to be set then so should happen, not to use a hidden msi-signature to represent an instance of the property)

PROBLEM 2:
The file search does not use the value of property PROP1, but the value of the signature which represents the property's system search.
The file search must be made in the folder, if detected, indicated by property PROP1.


RESOLUTION ???:
1.
Duplicate all system searches to use their own properties 8-((
(To get the 1 to 1 relationship between properties and signatures)
INSTALLDIR can not be assign by several properties.

2.
Transform all conditions and searches to InstallScript 8-(
(InstallScript does not have many limitations, but I would prefer to use the UI-part of DevStudio. I am very familiar with InstallScript, but find all need of InstallScript as a flaw of the UI/MSI-interface)

3.
Hopefully someone got better ideas??

/ Regards
Pär Brånedal