9.4.2 adshappexec command (GUI application execution command) [only for Windows development environment]
Syntax
adshappexec [-m] [-d work-folder] [-v name-to-be-displayed] {-w executable-application-name | -n executable-application-name} [-- argument-1 argument-2...]
Description
Run the executable application without starting the application execution agent in order to perform debugging in the development environment.
This command outputs the return value of the executable application to the standard output. When using this command in a succeeding job as the return value of the job, the command stores the value in the variable with command substitution.
Arguments
- -m
-
This command suppresses the message output to the standard error output. This command can be used in environments where the standard input/output cannot be used.
This command outputs argument specification errors for the command and license check errors even when the -m option is specified.
- -d work-folder ~ <path name>((1 to 247 bytes))
-
This command specifies the work folder upon execution of the executable application.
When the work folder has not been specified, this command activates the application with the current path for execution of the adshappexec command.
If a work folder contains a space, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.
- -v name-to-be-displayed ~ <path name>((1 to 247 bytes))
-
This command specifies the name that appears when you left-click on the application execution agent icon.
If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when you executing the application from the job definition script.
If the name to be displayed is omitted, the executable application name is output.
In a Windows development environment, this command is only used for message output.
We recommend specifying this argument to distinguish applications when multiple executable applications are operated.
- -w executable-application-name ~ <path name>((1 to 247 bytes))
-
The application execution agent will not finish until the executable application is finished.
Specifies the file name of the executable application for the executable application name.
If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.
- -n executable-application-name ~ <path name>((1 to 247 bytes))
-
The application execution agent finishes without waiting for the executable application to finish.
Specifies the file name of the executable application for the executable application name.
If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.
- -- argument-1 argument-2... ~ <argument>((1 to 1,023 bytes))
-
Specifies the parameter after -- that is specified when executing the executable application.
Do not specify an argument when specifying an associated executable application.
You can specify any number of arguments as long as the total length of the arguments is within 1,023 bytes.
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
Other than 0 |
Abnormal termination |
There are return codes for 2 processes in the adshappexec command. The return code for each process is handled as follows:
The output of the return value at the position where the error has occurred is as follows:
- (a) Error when processing the adshappexec command
-
A value is output as the return value of the command.
In addition, a message is output to the standard error output.
- (b) Return value of the executable application
-
A value is output to the standard output.
In addition, the return value of the executable application is output to the standard error output.
The adshappexec command will not end abnormally even if a return value other than 0 is returned with the return value of the executable application.
To confirm the return value of the executable application, check the messages or the details of the standard output.
Notes
-
You must specify the -w argument and -n argument of the adshappexec command.
The argument specified last is enabled in the following cases:
- If the -w option and the -r option are specified at the same time
- If the -w option is specified multiple times
- If the -r option is specified multiple times
-
The executable application uses the environment variable of the user running the application.
-
If the same option is specified multiple times, the last specification is enabled.
-
When executing the application having the following specifications by using the -w argument, the adshappexec command may not terminate even when the specified file is terminated.
-
Even if you close the file specified for the executable application, the executable application itself will not be terminated.
In such case, the adshappexec command is terminated if the application itself is terminated.
Example: If you close only the Excel file that is specified as the executable application and do not terminate Excel itself
-
-
Depending on the specification related to the start of processes of the executable application, the adshappexec command may be terminated without waiting for termination of the application even if the -w argument is specified.
The adshappexec command may terminate under the following cases:
- (1) If KNAX7259-W is output
-
Example: If Excel itself has already been operated before executing the Excel file as an executable application
In this case, run the executable application while Excel is not being run or adopt the operation in which the -w argument will not be used.
- (2) If KNAX7259-W is not output
-
Example: If you execute explorer.exe as an executable application
In this case, adopt the operation in which the -w argument will not be used.
-
Note the following points when performing a forced termination:
-
You cannot quit debugging by using the editor or quit the editor by pressing the × button while the executable application is operating.
You must wait for the executable application to finish.
-
Do not specify the adshappexec command for the operation definition of the trap command if TERM has been specified with the TRAP_ACTION_SIGTERM parameter.
In addition, when an executable application that performs interactive operation is specified, the executable application might wait for a reply and the job definition script might not finish.
-