Hitachi

JP1 Version 13 JP1/Script Description and Reference (For Windows Systems)


2.4.2 Script Launcher service settings

Organization of this subsection

(1) Overview of the Script Launcher service

The Script Launcher service allows you to control NetExec command requests in the logon space. The Script Launcher cannot be used to control NetExec command requests in the logon space as it cannot be started in a Remote Desktop environment. Use the Script Launcher service to control NetExec command requests in the logon space when using such a system configuration.

The Script Launcher service causes the programs that will be started by the NetExec command with the logon space specified to be started in the logon session of the user specified by the start parameter of this service, or the NetExec logon user settings file. Therefore, to use the NetExec command while the Script Launcher service is running, you must stay logged on. You can log on either from the console or from a Remote Desktop. If you log on through the Remote Desktop, you will stay logged on after disconnecting the session.

The Script Launcher service is registered in the Windows service with the following information:

When you use the Script Launcher service, Script Launcher can no longer be started. This means that automatic startup in the logon space is no longer possible. If you want automatic startup in the logon space, use Script Launcher rather than the Script Launcher service.

To use the Script Launcher service, follow either of the procedures below to configure settings:

Either procedure can be used when only specifying a single logon user as the user executing programs requested by the NetExec command.

To specify multiple logon users, configure settings using the NetExec logon user settings file.

(2) Configuration procedure for using the Script Launcher service

The procedure for using the Script Launcher service is described below.

(a) Configure settings using the Script Launcher service start parameter

The procedure used to configure Script Launcher service settings using the Script Launcher service start parameter is described below.

  1. Delete the Script Launcher registration in the startup menu.

  2. Use Windows Service Manager to change the properties of the Script Launcher service as shown below. Then, with the Properties dialog box open, start the Script Launcher service.

    On the General page:

    • Startup type: Automatic

    • Start parameters: Logon user name

      For the logon user name, specify the user name used for executing the command requested by the NetExec command.

      Specify the logon user name in user-name, user-name@domain-name, or domain-name\user-name format.

    Do not close the Properties dialog box before the Script Launcher service has started. If you do so, the information set for the start parameters will be lost. If the information is lost, set the information on the General page again, and then start the Script Launcher service.

  3. Log on with the logon user name specified for the start parameter.

    Do not log off while you are using the NetExec command. If you have logged on through the Remote Desktop, you can terminate the Remote Desktop Services client if you stay logged on after disconnecting the session.

Notes
  • To change the user name used for executing the commands requested by the NetExec command, stop the Script Launcher service and then restart from step 2.

  • To specify a user other than an administrator to log on via a Remote Desktop connection, assign the user the Create global objects permission in the security settings of the OS in advance.

(b) Configure settings using the NetExec logon user settings file

The procedure used to configure Script Launcher service settings using the NetExec logon user settings file is described below.

  1. Create the Conf folder under the folder where JP1/Script is installed.

  2. Create a NetExec logon user settings file that specifies users executing commands requested by the NetExec command, and then store it in the JP1/Script-installation- folder\Conf\SPTHLSV_LogonUser.conf.

    For details on the NetExec logon user settings file, see (3) NetExec logon user settings file details.

    The Script Launcher service start account (the local system account) must be assigned the following access permissions to the Conf folder and the NetExec logon user settings file.

    Conf folder

    Read and execution: Permitted

    Folder contents listing: Permitted

    Read: Permitted

    NetExec logon user settings file

    Read: Permitted

  3. Delete the Script Launcher registration in the startup menu.

  4. Use Windows Service Manager to change the Script Launcher service startup type to Automatic, and then start the Script Launcher service.

  5. Log on with the logon user account specified in the NetExec logon user settings file.

    Do not log off while the NetExec command is executed. When logging on in a Remote Desktop environment, you can disconnect the session to close the Remote Desktop service client while remaining logged on.

Notes
  • If changes are made to the NetExec logon user settings file, restart the Script Launcher service.

  • To specify a user other than an administrator to log on via a Remote Desktop connection, assign the user the Create global objects permission in the security settings of the OS in advance.

  • If a NetExec logon user settings file exists, the execution user set to the Script Launcher service start parameter will be invalid.

  • To restore settings using the Script Launcher service start parameter, delete the NetExec logon user settings file.

(3) NetExec logon user settings file details

The NetExec logon user settings file is a file used to specify the user logon space where programs requested by the NetExec command are executed when using the Script Launcher service.

(a) File name

SPTHLSV_LogonUser.conf (fixed file name)

(b) Storage folder

JP1/Script-installation-folder\Conf\

(c) Settings update timing

When the Script Launcher service is started.

(d) Specification format

Specification format 1:

Specify logon users in order of highest priority, separated by line breaks.

logon-user-1
logon-user-2
  :
Specification format 2:

Specify * to apply no restrictions on logon users.

*

(e) Description

Specification format 1:

Specify one logon user per line up to 256 bytes in length.

Specify logon users in either user-name, user-name@domain-name, or domain-name\user-name format. A wildcard (*) cannot be used with the specified logon user name.

You must specify at least one logon user. A maximum of 10 logon users can be specified.

When specifying multiple logon users, specify them in order of highest priority.

When the NetExec command is executed, logon users will be searched in the order specified. The program requested by the NetExec command will be executed in the logon space of the first retrieved user.

If none of the specified users are logged on, the NetExec command execution will return an error.

All user entries from the 11th entry onwards will be ignored.

Specification format 2:

Only enter a half-width asterisk character (*) in the first entry line. An error will occur if any entry other than an * is specified.

This will perform a search for any logged on users, and will execute the program requested by the NetExec command in the logon space of the first user found.

If no logon users are found, the NetExec command execution will return an error.

All entries from the second entry onwards will be ignored.

(f) Notes

  • The specified user must be logged on when the NetExec command is executed.

  • If you are able to set a fixed execution user (a user that remains logged on), it is recommended that you only specify the one logon user.

  • To reduce the amount of errors with the NetExec command itself caused by the user logon status, try specifying multiple logon users.

  • When specifying multiple logon users or an *, the execution user will vary depending on the user logon status. Avoid having the program called by the NetExec command be dependent on the permissions granted to the execution user.

    In addition, it is recommended that the program be created to avoid displaying windows where possible. Displaying windows can cause confusion as to which user the window is being shown to. Show windows that can be confirmed by any user.

  • Check the Task Manager, for example, to confirm the execution user while running. To check which user executed the command after execution is complete, check with the server trace file or the execution trace file (only when the calling program is an SPT file).

  • The NetExec logon user settings file only supports the Shift-JIS encoding format.

(g) Definition examples

Execution by Administrator
Administrator
Execution in order of priority by User01 and User02
User01
User02

(4) Procedure to switch operations from using the Script Launcher service to Script Launcher

To switch from using the Script Launcher service to using Script Launcher, perform the following procedure:

  1. In Windows Services Manager, change the Startup type for the Script Launcher service to Manual, and stop the Script Launcher service.

  2. Add the shortcut for Script Launcher to the Startup folder.