How do you condition two components containing same file name on registry search?

Hi,

I have an interesting problem right now and I have been trying to come up with a Windows Installer solution.  My requirement is straight forward enough:  There exist two versions of the same file, one in english and another for other languages, both have same file name. My task is to have the installer determine the correct file and install.  Anyhow, I created two unique components in my MSI package (unique GUID).  Each component is conditional on a registry (system search) and stored in a property for use.  

The build is working ok, but during install, the two components are not reliable whatsoever - even though the registry setting appears to be captured...The installer is not installing correct file based on condition, it installs at best, random.  What does this all mean? The conditions I placed are REGISTRY = XX and REGISTRY <> XX.  I have even tried specifying the registry value in the system search and use REGISTRY and NOT REGISTRY conditions.  Nothing seems to work!

I ran the ICE validator and it returned back ICE30, an error to do with two distinct file names, etc. Anyhow, I have checked the tables directly for any missing signatures or inconsistent signatures, I find nothing.  

I'm not sure what else to do then scrap this MSI project and write VBScript to carry out my installation, I really do not want this. I would ideally like an MSI package.  Any ideas what might be going on here?

Any help is much appreciated.
SugaBabyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vadim RappCommented:
I think, the right way to address this problem is by so called Qualified Components - details are at http://msdn.microsoft.com/en-us/library/aa370947%28VS.85%29.aspx

If you don't want to go that way, then I would troubleshoot by showing the result of your condition on a dialog, or by showing a message, or by debugging.
0
Vadim RappCommented:
clarification: "this problem" in the prev. comment means installing different versions of the same file depending on the language.
0
SugaBabyAuthor Commented:
I have now added the components to the PublishComponents table.  I am still having same issue - even using this so called "qualified" component idea, still produces no improvement.  Now, I am looking at the log file line by line.  I see an entry that I cannot explain:

Action start 16:27:21: INSTALL.
Action start 16:27:21: AppSearch.
MSI (s) (B8:38) [16:27:21:430]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (B8:38) [16:27:21:430]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\Test\Country 3: 2
MSI (s) (B8:38) [16:27:21:430]: Doing action: LaunchConditions

From this, I see that the installer is not executing the system search I created to check the registry key value, store within a property and finally install the correct file based on the property value.  Or it is performing the system search, but the registry key has no permissions? Error 2262 and 1402 make no sense to me; I am not sure what to do here.  
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Vadim RappCommented:
2262 means "stream does not exist", and 1402 means "could not open key because of system error" . I would (1) very closely look at the system search, if it's really looking for registry value (rather than for directory, for example), and (2) practiced this system search on new trivial sample installation created from scratch.
0
SugaBabyAuthor Commented:
This is a very strange error for a system search. System search should be easily executed - I have never seen a registry key being unreadable for a system search.  I am using InstallShield.  I may try Wise or VIsual Studio to create a new install project and see how it goes.  

The other factor involved here is the two conditional files are both havng the same name and directory location - i.e. I want my installer to detect, by registry key, which file should be installed. I notice the components involved give a unique key for each, so I don't know if this matters.  
0
Vadim RappCommented:
Things like this sometimes happen when you erroneously use not "search for registry key" but "read directory name from registry". Does the table RegLocator have 2 in Type column?
0
SugaBabyAuthor Commented:
Hi,

Yes the Type column has 2 in the entry.  Below I have pasted in the value types:

msidbLocatorTypeDirectory 0x000 0 Key path is a directory.
msidbLocatorTypeFileName 0x001 1 Key path is a file name.
msidbLocatorTypeRawValue 0x002 2 Key path is a registry value.
msidbLocatorType64bit 0x010 16 Set this bit to have the installer search the 64-bit portion of the registry. Do not set this bit to have the installer search the 32-bit portion of the registry.

2 seems to be the proper value.  Not sure what to think here.
0
Vadim RappCommented:
thoughts:

1. is this the only search in the installation?

2. Try #2 from http:#33449677 . Also I would use regmon /process monitor to see what Installer is actually searching for.

3. upload your installation here (change file extension to .txt) and I'll take a look.

0
SugaBabyAuthor Commented:
This is the event capture from process monitor.  It seems like key is opened for read, but returns not found result.  I have no idea how this could be the case because the key exists prior to running installation, this seems very unusual.  

Date & Time:      8/17/2010 12:01:50 PM
Event Class:      Registry
Operation:      RegOpenKey
Result:      NAME NOT FOUND
Path:      HKLM\SOFTWARE\Test\Country
TID:      3200
Duration:      0.0000120
Desired Access:      Read
0
Vadim RappCommented:
Verify that the key name does not have a space in the end, and that Country is indeed the key rather than value under HKLM\SOFTWARE\Test\
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SugaBabyAuthor Commented:
In InstallShield, you must always specify one branch up when doing a system search for a key, then it works perfectly.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.