cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
I am trying to put a custom ace in my conflict solver which would allow me to check for any Uninstall key that my registry table may have. However it seems that string functions such as SUBSTRING, LEFT or RIGHT are not working due to which I am not getting any query results for the following 'Where' clause:

SUBSTRING([key],1,51) = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'

This where clause is working outside the AdminStudio shell.
Hope somebody from IS would share his/her views on this.

Nio
(6) Replies
I'm not certain, but I believe the issue is that custom ACE rules you define in the wizard are limited to the subset of SQL syntax supported by MSI; you can review the operators and keywords supported in this subset in the MSI Help Library page "SQL Syntax".

If you need more sophisticated checking, I gather you'll need to write a custom validator DLL, à la KB article Q108429 (http://support.installshield.com/kb).

[P.S. I guessed wrong about the MSI syntax: ICE rules use MSI's SQL subset, ACE rules do not. See AllenSaxton's reply.]
CChong
By Level 11 Flexeran
Level 11 Flexeran
Nio,

Can you clarify what version of AdminStudio you are using?
If you are using AdminStudio v5.0 'Value Pack 1', then can
your clarify whether you are creating a 'Source Only' or 'Source and Target' custom rule. This information would help me form the appropriate local test case.

Since SUBSTRING does not appear to be supported by Access, I will infer that you are using SQL Server and that you intend to run this custom rule only on SQL Server. When you say that the rule is 'not working', I will infer that you are getting no output in the conflict results output window and the Conflict view. You can confirm this second inference by checking the 'Report 'No' Results' check box and running the custom rule again.

The entire SQL grammer is supported by the Rules Wizard and custom ACE's. However, the actual 'Where' clause includes additional restrictions based upon package row identifiers. Please forgive me as I attempt to enumerate every possible theory as to why you are experiencing a problem.

1. This custom ACE is labeled as a 'Warning' and you have elected to suppress 'Warning' ACE results from the Tools - Options - Conflict tab.
2. Your SQL Server is configured for case-senstivity in which case the very specific 'Where' cause you are using does not match the data. The use of the UPPER or LOWER functions might correct the problem.
3. The particular registry key is not defined within the source and/or target packages to which you selected from the Conflict wizard.

Allen Saxton
InstallShield AdminStudio Development
Hi Allen,

I am using AdminStudio 5.01 Professional Eval version with MSDE 2000 Sp3.

On reading your posting I tried the same ACE rule after importing the MSI package to my database and then verified it against some other already imported package with the rule. WOW !! This works..

However as per IS Best practices, I would like to obtain this result before importing the MSI package to my catalog. If you could help me working out with this it would be a great help as I am sckeptical about the fact that there will be a way out.

Reason being (what I believe) that before impoting MSI package, the Rule's query is fired on MSI databse only which allows only limited SQL syntax. Also I would like to know how exactly the discretion between the 'Source Only' and 'Source and Target' custom rule is being made. Thanks!

Nio
(An admirer of IS Products and its Support)
CChong
By Level 11 Flexeran
Level 11 Flexeran
Nio,

I now understand your problem. The MSI engine does indeed have a much more limited 'Where' clause query grammer than either Access or SQL Server. I am very confident that SUBSTRING is not supported by the MSI query engine.

Based upon the type of custom rule you have constructed, you have no pratical choice but to import the package into your Application Catalog before doing your conflict checking. You can of course import the package into a temporary group for this purpose.

The 'Source' and 'Source and Target' custom ACE rules differ in how the queries strings are formed. The primary difference being in how the 'Where' clause is modified to restrict the query results to the appropriate source and target packages selected in the Conflict wizard. The other significant difference is that the 'Source and Target' custom rules will use a join condition to merge the results between the source and target packages.

Allen Saxton
InstallShield AdminStudio Development
Allen,

I doubt I can create self join queries as the Rules Wizard allows to write Where clause only. However for self join queries I think I would require to have access to From cluase also.

If I am not right in my perception, please let me have some sample queries for "Source and Target" Custom ACE. Thanks!

Nio
CChong
By Level 11 Flexeran
Level 11 Flexeran
Nio,

The Rules wizard attempts to abstract away some of the more complex aspects of SQL grammer. If you select a 'Source and Target' type custom ACE, then we will the 'Where Clause' panel of the wizard will include a required field to enter a Join column.

Internally, ConflictSolver will use the Join column to combine the sets of records associated with the Source and Target packages before any of the 'Where' clause conditions are applied.

Allen Saxton
InstallShield AdminStudio Development