6.2.4 Notes on writing command lines
The following notes apply to writing command lines:
-
The values specified in a command line apply only to the specific script file. To apply command line values to all the script files on the computer, set the values in the following registry:
- Registry key
-
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Hitachi\JP1/Script\SPTF\SPV
- Value name
-
CommandLine
- Value datatype
-
REG_SZ
- Value
-
Value in a command line
- When the setting takes effect
-
The setting takes effect the next time the script file is executed.
- Note
-
When a command line is specified in the dialog box and in this registry, both specifications are valid. However, if different values are specified in a parameter, such as /SPXLV(3) in the dialog box and /SPXLV(0) in the registry, the specification in the dialog box takes precedence.
-
Of the command line values specified to the abovementioned registry, the /NOEVLOG value specified also applies to the JP1/Script service, the Script Launcher, and the Script Launcher service. Do not suppress event log output for the JP1/Script service, Script Launcher, and Script Launcher service by setting a command line in the execution environment file. Instead, specify /NOEVLOG or /NOEVLOG(8) in the above registry. When doing so, the specified settings are applied when starting up the JP1/Script service, the Script Launcher, and the Script Launcher service again.
-
Unlike /SPALV(n) and /SPXLV(n), /NOEVLOG and /NOEVLOG(n,n,...) specified in a command line in the Set Execution Environment (Start Information) dialog box or Set Execution Environment (Command Line) dialog box are interpreted as location variables. If you do not want them interpreted as location variables, set 1 for the registry key shown below.
Irrespective of the registry value, /NOEVLOG and /NOEVLOG(n,n,...) are not interpreted as location variables if they are specified in a command line written in executable form (SPTXE.EXE) in a user program used to call a script. This also applies if they are specified for CommandLine in the registry.
- Registry key
-
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Hitachi\JP1/Script\SPTX
- Value name
-
NoEvLog_Opt
- Value datatype
-
REG_DWORD
- Value
-
0: Interpret /NOEVLOG or /NOEVLOG(n,n,...) as a location variable (initial value).
1: Do not interpret /NOEVLOG or /NOEVLOG(n,n,...) as a location variable.
- When the setting takes effect
-
The setting takes effect the next time the script file is executed.
-
To include n double quotation marks (") as is in a parameter, write n*2 double quotation marks and enclose the entire parameter with double quotation marks.#
At this time, set 1 for the registry key shown below.#
To use the NetExec command, also set 1 in the registry on the computer you are calling.
- Registry key
-
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Hitachi\JP1/Script\SPTX
- Value name
-
DQString_Opt
- Value datatype
-
REG_DWORD
- Value
-
0: If you are using quotation marks in a parameter string, the setting that allows you to specify n*2 double quotation marks (") and enclose the entire parameter with double quotation marks (") is disabled (this is the default value).
1: If you are using quotation marks in a parameter string, the setting that allows you to specify n*2 double quotation marks (") and enclose the entire parameter with double quotation marks (") is enabled.
- When the setting takes effect
-
The setting takes effect the next time the script file is executed.
If a value other than 1 is specified for the above registry key, the number of double quotation marks (") that must be specified varies depending on the execution format of the script file.
-
To use a command line executable (SPTXE.EXE) in a user program to launch a script file:
Specify n*4 double quotation marks (") and two double quotation marks (") enclosing the entire parameter.
Example: Specify a"b for the parameter string.
SPTXE.EXE SPT.spt "a""""b"
-
To specify the parameter of the Exec command to call a script:
Specify n*4*2 + 2 double quotation marks (") and two double quotation marks (") enclosing the entire parameter.
Example: Specify a"b for the parameter string.
Exec(_SCF_+"ABC.SPT", True ,"a""""""""""b")
-
To specify the parameter of the NetExec command to call a script file:
Specify n*4*2*2*2 double quotation marks ("), and 15 double quotation marks (") before and after the parameter.
Example: Specify a"b for the parameter string.
NetExec ( comp1,_TEMP_+"NETWORK.SPT" ,True , ,False , _
, """""""""""""""a""""""""""""""""""""""""""""""""b""""""""""""""")
- #
-
If you do not specify this registry, the specification requirements become complicated. It is recommended that you specify this registry when you are developing a new system.
-
If you set parameters in a command line used for starting a script and in a command line in the script execution environment file, both specifications take effect. In this case, the parameters specified in the command line used for starting the script are applied first.