Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-12
11
Medium Priority
?
1,153 Views
Last Modified: 2013-11-14
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.
0
Comment
Question by:SugaBaby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33425592
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
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33425595
clarification: "this problem" in the prev. comment means installing different versions of the same file depending on the language.
0
 

Author Comment

by:SugaBaby
ID: 33449600
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33449677
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
 

Author Comment

by:SugaBaby
ID: 33449777
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
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33454011
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
 

Author Comment

by:SugaBaby
ID: 33455373
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
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33455931
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
 

Author Comment

by:SugaBaby
ID: 33456254
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
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 1500 total points
ID: 33456280
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
 

Author Closing Comment

by:SugaBaby
ID: 35353409
In InstallShield, you must always specify one branch up when doing a system search for a key, then it works perfectly.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the major drawbacks of deploying applications by GPO is the complete lack of any centralized reporting. After a normal deployment, there are two ways to find out if it was successful – by looking in the event log, and by looking in the log of…
One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question