Creating a Custom/Source and Target Packages ACE
AdminStudio 2022 | 23.0 | Application Manager
Edition:This functionality is included in the AdminStudio Professional and Enterprise Editions.
You can create a custom ACE to apply to Source and Target Packages. For example, you could use a Source and Target Packages ACE to determine if the installation of a Source package onto a Target system would overwrite or conflict with an existing entry in the .ini file in the System directory of the Target system.
Caution:Application Catalog does not support external package conflict checking for Custom - Source and Target Packages ACEs. Both the Source and Target Packages must be selected from the Application Catalog Database. If you attempt to run a conflict check on an external MSI package using a Source and Target Packages ACE, that custom ACE will not be executed.
To create a Source and Target Packages ACE that identifies .ini file conflicts:
1. | Launch Application Catalog. |
2. | On the Application Catalog tab menu, click Options. The Options dialog box opens. |
3. | On the ACE Tests tab, click the View Rules button. The Rules Viewer dialog box opens. |
4. | lick the New button. The Rules Wizard opens. |
5. | Complete the wizard panels to create your ACE: |
a. | On the General Information panel, enter the following values: |
Option |
Value |
Name |
INICheck |
Associated Table |
csmsiIniFile |
Package Type |
MSI |
Brief Description |
INICheck - Identifies conflicts found in an .ini file. |
Description |
Determines if the installation of a Source package onto a Target system would overwrite or conflict with an existing entry in the .ini file in the Target system’s System directory. |
Information URL |
http://www.yourcompany.com/INICheck.htm |
b. | On the Additional Information panel, enter the following values: |
Option |
Value |
Category |
INI Files |
Rule Type |
Custom - Source and Target Package |
c. | On the Custom Options panel, enter the following values: |
Option |
Value |
Error String |
The INI file called [Source.FileName] in the directory [Source.csFullPath] writes to the [Source.Section] section which is also written by the target package, [Target.ProductName]. |
Display String |
The INI file called [Source.FileName] in the directory [Source.csFullPath] writes to the [Source.Section] section. |
Severity |
Warning |
Report 'No' Results |
Deselected |
In the example above, [Source.Filename], [Source.csFullPath] and [Source.Section] are tokens. Tokens allow you to insert values at runtime from the internal Application Catalog Database into the Error or Display string. To use token replacement in a string, click the arrow to the right of the Error String or Display String text boxes and select a column name from the list. The column name is then inserted into the string in the format of [Source.ColumnName] or [Target.ColumnName], with the prefix identifying whether the column is in the Source or Target package.
Note:If no prefix is used, Application Catalog assumes the “Source.” prefix.
You can also use the [Target.ProductName] and [Source.ProductName] pseudo-tokens to insert the name of the Source or Target package in a message, even though ProductName is not a table column name.
Note:The Token list is provided for your convenience; if you prefer, you can type the variables directly in the text boxes. For more information, see Token Grammar.
d. | On the Where Clause panel, in the Where Clause panel, click Build Expression. The Expression Builder dialog box opens. |
e. | In the Expression Builder, enter the following values: |
Option |
Value |
Table Columns |
[Source].[csFullPath] |
Comparison Operator |
= (Equal To) |
String Constant |
SystemFolder |
f. | Click OK to close the Expression Builder and return to the Where Clause panel. The expression that you just built is now displayed in the Where Clause text box: |
[Source].[csFullPath] = 'SystemFolder'
Note:When you are constructing simple expressions, it is helpful to use the Expression Builder dialog box, but you are not limited to the formatting options that the Expression Builder provides to you. If you know how to write Where clauses in SQL, you can use significantly more powerful expressions by entering them directly in the Where Clause text box on the Where Clause panel or on the Where Clause tab of the ACE Rule Properties Dialog Box.
g. | Click Build Expression again to open the Expression Builder. |
h. | In the Expression Builder, enter the following values: |
Option |
Value |
Table Columns |
[Source].[Section] |
Comparison Operator |
= (Equal To) |
String Constant |
[Target].[Section] |
Expression Operator |
AND |
Note:When using the Expression Builder dialog box to create a Source and Target Packages custom ACE to compare the value of a column in the source table to the value of a column in the target table, you can select the first table column name from the Table Columns list. However, you have to manually enter the second table column name in the Constant text box. When doing so, enter the table column name using the same syntax that is used in the Table Columns list: [Source].[ColumnName] or [Target].[ColumnName].
i. | Click OK to close the Expression Builder and return to the Where Clause panel. The expression that you just built is now displayed in the Where Clause text box, added to the end of the first expression you built: |
[Source].[csFullPath] = 'SystemFolder' AND
[Source].[Section] = '[Target].[Section]'
j. | In the Join Column list, select csFullPath. |
The Join Column is a table column in the Application Catalog database that has a matching value for both the Source and Target packages. Rows in each of the packages that have a matching value in the Join Column are selected and those rows are checked against the Source and Target Packages.
k. | Click the Test button to validate the expression. A message appears stating that the query executed properly. |
l. | On the Summary panel, review the summary of your new ACE and click the Finish button. |
6. | Click the Close button. The Rules Viewer dialog box closes. |
This new Custom ACE is now available for use in subsequent testing.
See Also