Appendix E. Common functions for Windows systems
Prerequisite Scanner has a set of common functions in the/lib/
common_function.vbs file for running checks on Windows systems.
© Copyright IBM Corp. 2009, 2012
Table 32. Functions in common_function.vbs
Function
"allFiles()" on page 114
"arrayToString()" on page 114
"bigthan()" on page 115
"changeMG()" on page 115
"checkItemToString()" on page 116
"dictionaryToString()" on page 116
"exeCommand()" on page 117
"filterCommand()" on page 117
"filterFile()" on page 118
"findNewest()" on page 118
"findSuitableFile()" on page 119
"fmt()" on page 120
"formatForDisplay()" on page 120
"formatSizeForDisplay()" on page 121
"getDecimalSeparator()" on page 121
"getFirstMatch()" on page 121
Description
Reads the file names in a specified directory
into an array.
Creates a string representation for the array.
Calculates the difference between the
expected and actual value of the prerequisite
property if that prerequisite property is a
size in MBs or GBs.
Converts the input parameter to MBs or GBs
for disk space or memory prerequisite
properties.
Creates a string representation for the
CheckItem object.
Creates a string representation for the
scripting dictionary object.
Executes the specified command and returns
the result from that command's execution.
Executes the specified command and returns
the lines from the result of the command
that match the specified pattern.
Reads and filters the contents of a file to a
scripting dictionary object.
Finds the latest configuration file.
Finds the relevant configuration file for a
product and version.
Modifies a string by adding a specified
number of characters from another string to
it and padding the other string with space
characters if the length of the other string is
too short or truncating the other string if it
is too long.
Formats the input parameter to make it
readable.
Takes the input parameter and appends or
trims the fractional part of the input
parameter to two decimal points, for
example, 123MB to 123.00MB or 12.123MBs
to 12.12MBs.
Determines the decimal separator that is
used for the current locale.
Gets the first match of the search string in
the array.
113
Need help?
Do you have a question about the Prerequisite Scanner and is the answer not in the manual?
Questions and answers