Creating Custom Evaluators For Windows Systems - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

6. Repeat steps 2 to 5 for each custom prerequisite property.

Creating custom evaluators for Windows systems

You can create VBScript evaluators if the basic evaluators do not compare the
expected and actual values for the prerequisite properties by using the correct
evaluation criteria. When you create custom evaluators, the file name must end
with _compare and stored in the /Windows subdirectory. The custom evaluator can
use the common functions and sub routines to compare the values if required.
Before you begin
Ensure that you review the set of functions and sub routines in the following
appendixes before you create the evaluator. Determine whether you can use any of
them to compare the values:
v Appendix E, "Common functions for Windows systems," on page 113
v Appendix G, "File utility sub routines for Windows systems," on page 129
v Appendix F, "Logging utility sub routines for Windows systems," on page 127
v Appendix H, "Other common functions and sub routines for Windows systems,"
Note: The common function, "passOrFail()" on page 123, can compare the actual
and expected values for the following data types: a generic number; size in MBs or
GBs; processor speed in MHz or GHz; boolean value; or a string. Create only a
custom evaluator if the passOrFail function cannot be used.
Procedure
1. Create a VBScript file. Save the file in the ips_root/Windows directory, with a
2. Add the code to compare the actual and expected values that are passed to the
3. Run the custom evaluator to ensure that there are no runtime errors and debug
echo "\`wrlDebug "Finished" "env.path.jar"\`" >>/tmp/prs.check
echo "\`wrlDebug "OutPutValueIs" \$ss\`" >>/tmp/prs.check
echo "\`wrlTrace "Done" "env.path.jar"\`" >>/tmp/prs.check
fi
on page 131
variant of the following file naming convention:
[prefix_identifier.]property_name[.suffix_identifier]_compare.vbs
where:
v prefix_identifier is an identifier for a predefined category of prerequisite
properties as outlined in Table 3 on page 4. This prefix identifier is required
by some of the predefined categories.
v property_name is the name of the prerequisite property.
v suffix_identifier is an optional identifier for a subtype of prerequisite
properties as outlined in Table 4 on page 6.
evaluator as arguments by using VBScript COM and associated functions.
Ensure the comparison returns standard output as follows:
v "PASS" when the expected value for the prerequisite property is equal to or
greater than the actual value for the prerequisite property
v "FAIL" when the expected value for the prerequisite property does not equal
the actual value for the prerequisite property
as necessary.
Chapter 3. Extending Prerequisite Scanner
53

Advertisement

Table of Contents
loading

Table of Contents