6.2.2 Command line parameters
- Organization of this subsection
(1) Parameters
Parameters specified in command lines are stored in location variables %n (where n is a positive integer) that are handled by script files. %0 is the script file name (full path), and %1 is the first position parameter (where %n is the nth parameter).
If specifying multiple parameters, follow the rules for writing command lines. For details, see 6.2.3 Command line coding conventions.
The folder name Program Files used in the following examples includes a blank.
- Example 1:
-
Command line written in the Set Execution Environment dialog box
- Command line format in the dialog box:
ABC 123 "C:\Program Files\"
- Values assigned to the location variables:
%0:script-file-name %1:ABC %2:123 %3:C:\Program Files\
- Example 2:
-
Script file called by specifying parameters in the Exec or NetExec command
- Command line format:
Exec ("C:\Temp\Test.SPT",True,"ABC","123","""C:\Program Files\""")
- Values assigned to the location variables:
%0:C:\Temp\Test.SPT %1:ABC %2:123 %3:C:\Program Files\
- Example 3:
-
Command line written in executable form (SPTXE.EXE) in a user program
- Specification in the user program:
SPTXE.EXE C:\Temp\Test.SPT ABC 123 "C:\Program Files\"
- Values assigned to the location variables:
%0:C:\Temp\Test.SPT %1:ABC %2:123 %3:C:\Program Files\
(2) /SPALV(n) (or /spalv(n))
Use this parameter to specify whether to output an analysis trace file. A trace file is output by default when this parameter is omitted. For n, specify 0 or a greater integer. The default is a nonzero value.
-
n = 0: Does not output an analysis trace file.
-
n = Non-zero value: Outputs an analysis trace file.
- Example:
-
Specify as follows to suppress output of an analysis trace file.
SPTXE.EXE C:\Temp\Test.SPT ABC 123 "C:\Program Files\" /SPALV(0)
(3) /SPXLV(n) (or /spxlv(n))
Use this parameter to indicate whether to output an execution trace file and to specify the output level. When this parameter is omitted, only error results are output to the trace file. For n, specify an integer from 0 to 3. The default is 1. If you specify 2 or 3, execution performance of script files will be degraded because the amount of output information will increase.
-
n = 0: Does not output an execution trace file.
-
n = 1: Outputs only error results to the execution trace file.
-
n = 2: Outputs error and normal results to the execution trace file.
-
n = 3: Outputs error and normal results, and command start and end times, to the execution trace file.
- Example:
-
Specify as follows to output the command start and end times to the execution trace file.
SPTXE.EXE C:\Temp\Test.SPT ABC 123 "C:\Program Files\" /SPXLV(3)
(4) /NOEVLOG (or /noevlog)
Use this parameter to suppress event log output. If you omit this parameter, all event logs are output. For details about the types of event logs, see 6.1.13 JP1/Script event logs.
If this parameter is omitted, all event logs are output.
- /NOEVLOG (or /noevlog)
-
Outputs an event log for error events only.
- /NOEVLOG(n,n,...) (or /noevlog(n,n,...))
-
Disables log output for the event IDs specified in n. Event IDs can be specified in any order. Enter commas to delimit the IDs.
- Example:
-
Specify as follows to suppress log output for event ID 3 (user-specified log using the MessageEventLog command).
SPTXE.EXE C:\Temp\Test.SPT ABC 123 "C:\Program Files\" /NOEVLOG(3)