Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Overview and System Design Guide


4.19.4 Executing commands on client hosts

In JP1/IM, you can issue command requests from the Execute Command window to execute commands on client hosts (viewer hosts) as well as on managed hosts (agent hosts or manager hosts). This function is called the client application execution function.

The client application execution function does not use the JP1/Base functionality. This function will also let you execute a command to display windows.

A command executed on a client host (viewer host) by using this function is called a client application. You can also let a client application inherit event information.

Figure 4‒109: Overview of executing a client application from JP1/IM - View

[Figure]

For details about event inheritance, see 4.19.5 Inheriting event information when a command is executed. For details about how to execute a client application, see 8.1.1 Executing a command by using Command Execution and 8.1.2 Executing a command by using the Command button JP1/Integrated Management 2 - Manager Administration Guide. To execute command on managed hosts, see 4.19.3 Executing commands on managed hosts from JP1/IM - View.

Organization of this subsection

(1) Executable commands

The types of client applications are as follows:

However, the following commands cannot be executed:

Note that client applications are executed by the OS user who launched JP1/IM - View.

Important
  • Spaces and tabs (control code: 0x09) specified for commands are identified as delimiters for command arguments. To specify a space or tab as a command argument, enclose the character string that contains the space or tab with double quotation marks (").

    To specify a double quotation mark (") as a command argument, specify as \" by adding a backslash (\) before the double quotation mark ("). Note that \\" is identified as \ and ". If a backslash (\) is not placed before a double quotation mark ("), the character string subsequent to the double quotation mark (") is identified as an argument.

    The following are examples of delimiting command arguments:

Example of delimiting command arguments 1

Assume that the following command is specified:

c:\AppCommand.exeΔtest1Δtest2<tab>"test3Δ Δtest4"Δ"test5<tab><tab>test6"

Legend:

<tab>: Tab (0x09)

Δ: Space

Table 4‒29: Results of delimiting command arguments 1

No.

Delimiting status

Delimiting results

Description

1

Command

c:\AppCommand.exe

N/A

2

Argument 1

test1

Delimited by the preceding and following spaces.

3

Argument 2

test2

Delimited by the preceding space and the following tab.

4

Argument 3

test3Δ Δtest4

Delimited by the tab before "test3 and the space after test4". Spaces enclosed with double quotation marks (") are not delimited.

5

Argument 4

test5<tab><tab>test6

Delimited by the space before "test5. Tabs enclosed with double quotation marks (") are not delimited.

Example of delimiting command arguments 2

Assume that the following command is specified:

c:\AppCommand.exeΔtest1Δtest2<tab>"test3\"<tab>\"test4"Δ"test5Δ\\"Δtest6

Legend:

<tab>: Tab (0x09)

Δ: Space

Table 4‒30: Results of delimiting command arguments 2

No.

Delimiting status

Delimiting results

Description

1

Command

c:\AppCommand.exe

N/A

2

Argument 1

test1

Delimited by the preceding and following spaces.

3

Argument 2

test2

Delimited by the preceding space and the following tab.

4

Argument 3

test3"<tab>"test4

Delimited by the tab before "test3 and the space after test4". \" is identified as ".

5

Argument 4

test5Δ\

Delimited by the spaces before "test5 and after \\". \\" is identified as \ and ".

6

Argument 5

test6

Delimited by the preceding space.

  • In 64-bit editions of Windows, if you execute a command in the %WINDIR%\System32 folder, the WOW64 redirection function redirects the command to a command in the %WINDIR%\SysWow64 folder. If the command does not exist at the redirection destination, the command execution might fail. Be careful when you specify a command in the %WINDIR%\System32 folder as the execution command.

  • The executed command process inherits the user environment variables and system environment variables. If you specify %environment-variable-name% on the command line, however, the environment variable is not inherited.

(2) Conditions required for command execution

The following commands can execute client applications:

(3) Checking the command execution status and results

After you execute a client application, you cannot check the execution results (return value of the command, standard output, and standard error output) and the execution status from the Log in the Execute Command window of JP1/IM - View. The Log displays a message indicating that either the command was executed or that command execution failed.

To check the execution results of client applications, create a batch file to output the execution results to a file.

Client applications cannot be stopped from JP1/IM - View. The user must stop the client applications.

(4) Handling of user account control

When the user account control (UAC) of Windows is used, if an OS user other than administrator user starts JP1/IM - View and executes a command that requires administrator permission, the command execution is interrupted. When the command execution is interrupted, the Log field of the Execute Command window displays a message to indicate that startup of a client application failed. The user can execute a command in JP1/IM - View that was launched by clicking Run as an Administrator or can execute a command from the command prompt launched by clicking Run as an Administrator.

Table 4‒31: Whether commands can be executed for each execution permission (when Windows' UAC is used)

No.

Permission required for command execution

OS user who started JP1/IM - View

Administrator user

User in Administrators group

Other user

1

Administrator

Y

Δ

Δ

2

Administrators

Y

Y

Δ

3

None

Y

Y

Y

Legend:

Y: Executable.

Δ: A message is output, indicating that startup of the client application failed, and execution of the command is interrupted.