13.6 dcminst.exe (creating and executing jobs)
This section describes the dcminst command, which creates and executes jobs.
You can check the result of a job executed by this command in the Job Status window of the managing server.
Function
This command creates and executes the following jobs related to remote installation:
-
Install package job
-
Transfer package to relay computer job
-
Batch delete packages on relay computer job
-
Send package, allow client users to choose job
Format
dcminst.exe [processing-key] [/f] [/s] /i parameter-file-1 [parameter-file-2] /o output-file-name
Arguments
-
processing-key
This argument specifies the type of job to be executed. Specify one of the processing keys (listed below) immediately after the command name. If this argument is omitted, specification of NETM_INSTALL is assumed.
-
NETM_INSTALL
When the processing key is NETM_INSTALL, this command executes an Install package job. In the parameter file (or command arguments), specify the package to be installed and the job destination.
-
NETM_STORE
When the processing key is NETM_STORE, this command executes a Transfer package to relay computer job. In the parameter file (or command arguments), specify the package to be transferred and the job destination (an agent that is under a relay system or management relay server and that has the same name as the relay system or management relay server).
-
NETM_DELETE
When the processing key is NETM_DELETE, this command executes a Batch delete packages on relay computer job. In the parameter file (or command arguments), specify the job destination (an agent that is under a relay system or management relay server and that has the same name as the relay system or management relay server).
-
NETM_USERINST
When the processing key is NETM_USERINST, this command executes a Send package, allow client users to choose job. In the parameter file (or command arguments), specify the package to be installed and the job destination.
-
-
/f
If the package specified as the installation target has already been installed in the installation-destination computer, this command with the argument /f specified installs the package by overwriting the already installed package. When this argument is not specified, this command ends normally without overwriting the already installed package.
When the processing key is NETM_DELETE, this argument is ignored even if specified.
-
/s
When the argument /s is specified, this command creates a job, and then stores it without execution. When the processing key is NETM_UNARC, this argument is ignored even if specified.
When this command is executed with this argument specified, the job number is not output to the output file.
-
/i
In the argument /i, specify one or two full path names of the parameter files to be used. When specifying two full path names, separate them by a space. Specifying three or more full path names causes this command to fail.
When two parameter files are specified, JP1/IT Desktop Management 2 interprets individual files while linking their contents with each other. If you define the job destination and the package to be installed in separate parameter files, you can conveniently use the parameter files. For example, you can re-distribute a different package to the same computer or the same package to a different destination simply by changing the content of either file. In this case, you can use the output file of the dcmpack command as a parameter file specifying package attributes.
-
/o
In the argument /o, specify the full path name of the output file. When this command ends normally, the items listed below are output to the specified output file. If the output file already contains data, the data is overwritten.
-
Job name
-
Job number
-
Path name of job storage folder
The job number (value of jobno) identifies the job that is started. When you need to delete the job or check the job status, write the value of jobno to the parameter file. Note that, if the argument /s is specified, the job number is not output.
If the argument /s is specified, the output file can be used as a parameter file for the dcmjexe and dcmrmgen commands without change. When the argument /s is not specified, the output file can be used as a parameter file for the dcmjbrm, dcmrtry, dcmstat, and dcmstsw commands.
-
Correspondence between the specification contents of parameter file and command arguments
The contents of the parameter file for this command can also be specified in command arguments. The following table shows the specification contents of the parameter file and the command arguments corresponding to them.
Specification content of parameter file |
Content |
Whether to specify |
Command argument |
|
---|---|---|---|---|
Tag |
Parameter |
|||
group |
Host group name |
Y#1 |
/g value |
|
host_name |
Host name |
Y#1 |
/h value |
|
destination_id |
ID name |
Y#1 |
/X value |
|
package_name |
Package name |
Y |
/p value |
|
package_id |
Package ID |
Y |
/I value |
|
version_revision |
Version/revision |
Y |
/v value |
|
generation |
Generation number |
Y |
/G value |
|
cabinet_name |
Cabinet name |
Y |
/c value |
|
cabinet_id |
Cabinet ID |
Y |
/C value |
|
package_code |
Code type |
Y/N |
/KW or /KP |
|
job_generator |
Job name |
Y/N#3 |
/j value |
|
jobno |
Job number |
N |
-- |
|
job_folder |
Path name of job storage folder |
Y/N |
/l value |
|
unsuspended |
Whether to distribute during suspension |
Y/N#4 |
/uns value |
|
job_entry_date |
Job registration date and time |
Y/N |
/jst value |
|
job_execution_date |
Job execution date and time |
Y/N |
/jsx value |
|
job_expiration_date |
Job expiration date |
Y/N |
/jsp value |
|
split_size |
Split size |
Y/N |
/sds value |
|
wait_time |
Distribution interval |
Y/N |
/sdt value |
|
client_wake_up |
Whether to start the client |
Y/N |
/WWU |
|
client_shutdown |
Whether to shut down the client |
Y/N |
/WUS |
Command format without using any parameter file
The following shows the command format to be used if you specify only command arguments without using a parameter file.
dcminst.exe [processing-key] [/f] [/s] {[/g host-group-name] [/h host-name]|/X ID-name} /p package-name /I package-ID /v version/revision /G generation-number /c cabinet-name /C cabinet-ID [{/KW|/KP}] [/j job-name] [/l path-name-of-job-storage-folder] [/uns whether-to-distribute-during-suspension] [/jst job-registration-date-and-time] [/jsx job-execution-date and-time] [/jsp job-expiration-date] [/sds split-size] [/sdt distribution-interval] [/WWU whether-to-start-the-client] [/WUS whether-to-shut-down-the-client] /o output-file-name
Return codes
The following table lists the return codes that are output when the dcminst command is executed:
Code |
Meaning |
Action to be taken |
---|---|---|
0 |
The managing server started the job. |
None |
1 |
The parameter file cannot be opened, or the file format is incorrect. |
Check the specification of the parameter file or its description format. |
2 |
An invalid value was specified in a command argument or the parameter file. |
Check the values specified in command arguments and the parameter file. |
3 |
Connection to the database failed. |
Check database settings in the setup of the managing server. |
4 |
The output file cannot be opened. |
Check the specification of the output file. |
5 |
Connection to the JP1/IT Desktop Management 2 service failed. |
Check whether the service of JP1/IT Desktop Management 2 - Manager has started. |
12 |
Restoration of one or more archive files failed. |
Reference the event log. |
Notes
-
Specifiable numbers of job destinations and packages
-
When you use the parameter file for specification, you can specify a maximum of 200 job destinations per single execution of the dcminst command. Also, you can specify a maximum of 100 packages per single execution of the command.
-
When using command arguments for specification, you can specify only one job destination and package. In the arguments /g and /h, however, you can specify a maximum of 200 values for each, by separating the values by a semicolon (;).
-
Even if multiple packages have been specified in the parameter file, the package all specifications become invalid when packages are specified by using command arguments.
-
-
Specification of argument /f
-
When the argument /f is specified, this command transmits packages to specified destinations regardless of whether the same packages have already been distributed to the destinations. To avoid needlessly increasing network traffic, use the argument /f only when you need to overwrite already-distributed packages.
-
When the argument /f is specified, this command enables you to install software (of the same version, but different content, as already-installed software) by overwriting. If, however, overwrite installation is performed, JP1/IT Desktop Management 2 might be disabled from managing versions in installed package information.
-
-
How this command operates when the job name specified in the job_generator parameter under the JOB_ATTRIBUTE tag already exists
This command creates a new job based on the job definition for the existing job.
-
Specification of whether to start the client
When specifying whether to start the client, specify a host group name or ID for the job destination. If you specify a host name for the job destination, the specification of whether to start the client, is ignored. Note that, when the job destination is a relay system, the specification of whether to start the client, is ignored unconditionally.
-
Specification of the path name of job storage folder
When you execute the dcmcoll command specifying the path name of a folder not defined in the Job Definition window as the path name of job storage folder, the specified folder is created. The created job storage folder is not deleted, even after command execution. If you do not use this folder, delete it after the job is complete.
Example
The following example shows use of this command to distribute software packaged under the name of Finance Data 2003 5 to the hosts dmp491 and dmp492, on which JP1/IT Desktop Management 2 - Agent (agent) is running.
- Creating the parameter file
-
Specify the hosts and the attributes of the packages as shown below, and then save the parameter file under any name.
** dcminst Parameter File Sample JOB_DESTINATION{ host_name=dmp491;dmp492 } PACKAGING_INFORMATION { package_name=Finance Data 2003 5 package_id=FD200305 version_revision=000001 generation=0000 cabinet_name=FCAB01 cabinet_id=F1 package_code=P }
- Executing the command
-
To store the created parameter file as C:\Dmbat\dcminst.txt and acquire the output file as C:\Dmbat\out.txt, specify the command as follows:
dcminst.exe /i C:\Dmbat\dcminst.txt /o C:\Dmbat\out.txt /j overwrite installation /f
- Checking the output file
-
When the command ends normally, the job name, job number, and path name of the job storage folder are output to the file C:\Dmbat\out.txt as follows:
JOB_ATTRIBUTE{ job_generator= NETM_INSTALL_2003_12_11_13_34_36 jobno= JB03121113315383 job_folder= \ }