Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


3.14.3 Windows update program installation(SYSTEM)

Function

This service template triggers Windows Update to automatically install update programs based on a list of target machines for which OS update is to be performed (hereafter referred to as the OS update information file). The OS update information file is a CSV or Excel file.

Each time Windows Update is automatically executed, a file containing the following information is output as the execution result: the exceptions list, the update program search results, the successfully-installed update programs, and the update programs that were not installed are exported as execution results to a file. This file is hereafter referred to as the "results file".

To use this service template, the following servers are required:

- Update information file server

A Windows server on which the OS update information file is stored

- Execution-target server

A server on which a supported version of Windows is installed

The following is an overview of the processing:

(1) Information about the execution-target servers (update-target servers) is obtained from the OS update information file.

Note: The following steps are repeated for each target server.

(2) On the execution-target server, a search is performed for update programs that meet all of the following conditions:

- Update programs to be automatically updated by Microsoft

- Update programs that have not been installed yet

- Update programs for installed software

(3) The following are excluded from the search results:

- Update programs whose numbers are included (as an exact match) in the exceptions list

- Update programs requiring user entry (such as service packs)

(4) From the results of steps (2) and (3), the update programs that are determined to be necessary are downloaded from Windows Update.

(5) The update programs downloaded in step (4) are installed.

When the above processing finishes, a results file (text file) is output to a folder on the execution-target server. This folder is specified by the property OS.updateResultOutputFolderNameRemote. The format of the file name is YYYYMMDDhhmm.txt. (For example: 201312312345.txt)

Note the following regarding of file using this service template:

- The following describes how to specify the settings in the OS update information file specified by the property OS.updateInfoFilePath.

The items to be specified are as follows:

- N-th column

Execution-target server: Specify an IP address or host name. When specifying an IP address, do not specify an IPv6 address.

Specify a column number (N) for the property OS.updateServerInfoColumn.

- M-th column

Exceptions list: Specify the numbers corresponding to the update programs that you do not want to install. Separate numbers by commas (,). You can specify a maximum of 1,024 bytes, including commas.

Specify the column number (M) for the property OS.updateExcludeListColumn.

For column numbers N and M, you can specify numbers from 1 to 255. For a CSV file, determine the column number by counting the leftmost column as the first column. For an Excel file, determine the column number by counting the leftmost non-empty column as the first column.

Example: (When N=1 and M=2)

"Execution target server","Exceptions list"

"host001","KB000001,KB000002"

"host002",""

- The following describes the contents of the file output to a folder on the execution-target server. (This folder is specified by the property OS.updateResultOutputFolderNameRemote.)

(a) Host name

(b) Exceptions list

(c) List of the titles of update programs returned as search results

In the search results, each update program is output on a separate line. For each update program, "adding" (for programs that are subject to installation) or "skipping" (for programs that are not subject to installation) is also specified.

For each update program for which "skipping" is specified, a reason (whether installation was skipped because user entry was needed or because the program was included in the exceptions list) is also specified.

(d) ResultCode for the overall update program installation

The ResultCode values and their meanings are as follows:

0: Installation was not executed, 1: Installation is in progress, 2: Installation ended normally, 3: Part of the processing failed, 4: Installation failed, 5: Installation was canceled

(e) List of the titles of update programs that were installed

The ResultCode value for the update is output for each program.

(f) Whether restart is required

If "Necessary" is output, restart is necessary. If "Unnecessary" is output, restart is unnecessary.

(g) Termination code for the script itself

The termination codes and their meanings are as follows:

0: Normal, 27: Abnormal (error details can be checked in the task log), 41: Abnormal (a plug-in error was detected) or necessary properties were missing (an error was detected in the plug-in script)

(h) Titles of update programs in the search results that were excluded or that were not installed due to an installation error

If reading an OS update information file fails, wait for the seconds specified in the OS.fileOpenRetryInterval property, and then repeat the number of times specified in the OS.fileOpenRetryCount property to retry for reading a file. If necessary, modify the property values to adjust your system environment.

Prerequisites

For the most recent information about the prerequisite products for the system, prerequisite products for the system executing the service templates, the supported OSs for the prerequisite products for the system executing the service templates, and OS running in the execution target server see the Release Notes.

Prerequisite products for the system:

JP1/Automatic Operation 12-00 or later

Prerequisite products for the system executing the service templates:

The following Microsoft programs that are installed:

- 2007 Office system drivers, or

Microsoft Access Database Engine 2010(32bit), or

Microsoft Access Database Engine 2016(32bit)

Supported OSs for the prerequisite products for the system executing the service templates:

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

OS running in the execution target server

- Windows Server 2008 R2 Standard/Enterprise/Datacenter

Note: Environments where Server Core is installed are excluded.

- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

Note: Environments where Server Core is installed are excluded.

Conditions for using the prerequisite products in the service-template execution system:

(1) The execution-target server must be running.

(2) The execution-target server must be able to access the website that allows Windows Update to be executed without using a proxy server.

(3) The execution-target server must be able to access the website that allows Windows Update to be executed from Internet Explorer (browser).

(4) The following service is running:

- Windows Update

(5) An OS update information file containing the following information must be stored on the local server:

(5-a) Number of columns

There must be no more than 255 columns after the first column containing a column name or data.

(5-b) Column names

For CSV files:

- If column names are necessary, specify them in the first row. If column names are unnecessary, do not specify them.

- Regardless of whether column names are specified, data retrieval must start from the second row or a following row.

For Excel files:

- Column names must be specified. In the file, the first row containing data is assumed to be the row of column names.

- Data retrieval starts from the row below the row of column names.

When specifying column names, follow the rules described in (7).

(5-c) Execution-target server information

Each row in the OS update information file must have a unique key value, specified in the key value column. You can use any value for the key value. We recommend that you use short values, such as integers starting from 1. Key values must not contain a double quotation mark (") or single quotation mark ('). The sum of the total number of bytes for all key values and the number of data rows must not exceed 1,017 bytes. If you omit a key value, the corresponding row will be excluded from the processing target.

- Exceptions list information

The exceptions list is a comma-separated list of program numbers (such as KB9999999). Update programs whose numbers are included in this list (as an exact match) are excluded from the installation target. You can specify any value for the exception list information of each row.

(6) In order to execute this service, you must set the local server (loopback address resolved by "localhost") and the server that is the connection destination as agentless connection destinations.

(7) When specifying column names, follow the rules below.

(7-a) Use string-type data instead of numeric-type data.

(7-b) The specifiable characters are as follows:

- The first character of the key value column name must not be a number (one-byte or two-byte) nor any of the following symbols: ! " # $ % & ' ( ) - = ^ ~ \ | ` ; + * [ ] { } , . < > ? _ /

- The key value column name cannot contain any of the following symbols: " # % & ' ( ) - = ^ ~ \ | @ ; : + * [ ] { } , . < > ? /

- The names of columns other than the key value column must not contain any of the following symbols: ! [ ] ` , .

(7-c) Each column name can have a maximum of 64 characters (one-byte or two-byte).

Cautions

[Notes on OS update information files]

(1) For Excel files, make sure there are no merged cells or cells containing errors in expression. If such a cell exists, a null value is read for that cell. In addition, make sure no write-protection password is set. If a write-protection password is set for the OS update information file to be read, the task terminates abnormally.

(2) Make sure that string-type data and numeric-type data do not coexist in the same column. If different types of data coexist, values might not be obtained correctly, depending on the specifications of the ODBC driver.

(2-a) Numeric-type data includes the following types of base-10 numbers:

Negative integers (Example: -12345)

Fixed-point numbers (Example: 3.1415)

Floating-point numbers (Example: 6.543E+10)

(2-b) String-type data is any data that is not numeric-type data.

(3) To obtain a column that contains different types of data from the file to be read, first perform one of the following steps:

- If the OS update information file is an Excel file, prefix each numeric-type value with a single quotation mark (').

- If the OS update information file is a CSV file, enclose each numeric-type value in double quotation marks (").

(4) If the OS update information file is a CSV file, enclose IP addresses in double quotation marks. IP addresses not enclosed in double quotation marks might be interpreted as numeric-type data, thus preventing the task from obtaining the correct values.

(5) When counting rows in the file to be read, empty rows after the first non-empty row and before the last non-empty row are counted as ordinary rows. Even if the number of rows containing data is 99 or less, if the total number of rows (including empty rows) is 100 or more, the task terminates abnormally.

(6) If the OS update information file is an Excel file, the actual value obtained from a cell might be different from the displayed value, depending on the type of data in the cell. The following shows data types that have notable differences between the displayed values and the actual obtained values:

(6-a) Boolean-type data (True/False)

Displayed value: TRUE/FALSE

Value stored in the cell: TRUE/FALSE

Actual obtained value: True/False

(6-b) Date data

Displayed value: mm/dd

Value stored in the cell: yyyy/mm/dd

Actual obtained value: yyyy/mm/dd

(6-c) Time data

Displayed value: hh:mm

Value stored in the cell: hh:mm:ss

Actual obtained value: hh:mm:ss

(6-d) Percent

Displayed value: n% (For example: 10%)

Value stored in the cell: n% (For example: 10%)

Actual obtained value: 0.n (For example: 0.1)

(6-e) Expression

Displayed value: (The result of the expression)

Value stored in the cell: (The expression)

Actual obtained value: (The result of the expression)

[Other notes]

(1) If an update program that performs automatic restart is installed, Windows automatically restarts the execution-target server.

(2) Do not simultaneously execute multiple instances of this service on the same execution-target server.

(3) For the number of the column to be read, specify an integer no greater than 255. If you specify a value greater than 255, the task terminates abnormally. Note that empty columns after the first non-empty column and before the last non-empty column are counted as ordinary columns.

Execution privilege

Users who belong to the Administrator group

Version

03.10.02

Tags

Configure OS,Windows

Property list

The following shows the list of the property groups set in the property:

Property group

Description

Initial display

OS update information file information

Specify information about the OS update information file.

Y

OS update information file details

Specify details about the OS update information file.

Y

Results file output folder information

Specify the name of the folder where the results file is output.

Y

The following shows the list of the properties to be displayed in the "Service Definition" window:

(Legend)

R: The property must be specified.

O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.

Property key

Property name

Description

I/O type

Shared

Required

Property group

windows.targetHost

Host name of the update information file server

Specify the host name or IP address of the Windows server on which the OS update information file is stored. IPv6 addresses are not supported.

Input

Disabled

R

OS update information file information

OS.fileOpenRetryCount

Retry count for reading a file

Specifies the number of times to retry when reading an OS update information file fails. This value multiplied by the retry interval gives the maximum waiting time. If "0" is specified, a retry is not performed.

Input

Disabled

R

OS update information file details

OS.fileOpenRetryInterval

Retry interval for reading a file

Specifies the retry interval in seconds for when reading an OS update information file fails.

Input

Disabled

R

OS update information file details

The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Property name

Description

I/O type

Shared

Required

Property group

OS.updateInfoFilePath

OS update information file path

Specify a full path of the file that contains OS update information. Make sure that you specify a file on the update information file server. The file extension of the file must be csv, xls, xlsx, or xlsm.

Input

Disabled

R

OS update information file information

OS.updateInfoSheetName

OS update information file's sheet name

Specify the name of the sheet that contains OS update information. Make sure that you specify this item if the OS update information file is an Excel file. The sheet name specified for a CSV file is ignored.

Input

Disabled

R

OS update information file information

OS.updateServerInfoColumn

Execution target server column number

Specify the number of the column that specifies the execution target server in the OS update information file. Specify an integer in the range from 1 to 255.

Input

Disabled

R

OS update information file details

OS.updateExcludeListColumn

Exceptions list column number

Specify the number of the column that specifies the exceptions list in the OS update information file. Specify an integer in the range from 1 to 255.

Input

Disabled

R

OS update information file details

OS.updateResultOutputFolderNameRemote

Result information file output folder (remote)

Specify a full path of the folder to which the results of update program automatic installation is output. Make sure that you specify a folder on the execution target server.

Input

Disabled

R

Results file output folder information

The following shows the list of the properties to be displayed in the "Task Details" window only:

Property key

Property name

Description

I/O type

Shared

common.taskResult

Results of repeating tasks

This property contains the results of each task (as "true" or "false"), in a comma-delimited format.

Output

Disabled

The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:

Property key

Characters that can be input

windows.targetHost

256 or fewer one-byte alphanumeric characters, periods (.), and hyphens (-).

OS.fileOpenRetryCount

Integer value in the range from 0 to 32767.

OS.fileOpenRetryInterval

Integer value in the range from 1 to 60.

The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Characters that can be input

OS.updateInfoFilePath

A string that has 8 to 255 characters, does not end with a backslash (\), and does not include the following symbols: < > | ; & * ? " % / [ ] !

OS.updateInfoSheetName

A string that has 1 to 31 characters except for: 1) The following single-byte symbols: < > | ; : & * ? " % / \ ! ` { [ ] 2) Multi-byte characters corresponding to the following symbols: : \ ? [ ] / *

OS.updateServerInfoColumn

An integer in the range from 1 to 255.

OS.updateExcludeListColumn

An integer in the range from 1 to 255.

OS.updateResultOutputFolderNameRemote

A string that has 200 or fewer characters, does not end with a backslash (\), and does not include the following symbols: < > | ; & * ? " %

Flow specification details

The following table shows the detailed specification of the flow:

Hierarchy

Display name

Plug-in

Plug-in name

Description

Error recovery method

1

osReadCSVExcelFileColumn_Syste

Obtain column data from a CSV/Excel file(SYSTEM)

Obtains information for identifying rows from the OS update information file.

After removing the cause of the error, run the service again.

2

ForEachPlugin

Repeated Execution Plug-in

Repeats the update processing the same number of times as the number of specified hosts.

After removing the cause of the error, run the service again.