13.9 dcmpack.exe (executing packaging)
This section describes the dcmpack command, which packages user data and user programs.
Function
This command packages user data and user programs in the managing server (JP1/IT Desktop Management 2 - Manager).
This command cannot package program products.
Format
dcmpack.exe /k password /i parameter-file-name [/o output-file-name] [/LC {ON|OFF}]
Arguments
-
/k
In the argument /k, specify the password to package software in the managing server.
Specify the password for the database of the managing server.
-
/i
In the argument /i, specify the full path name of the parameter file.
-
/o
Specify the full path name of the output file. When this command ends normally, the attribute information of the created package is output to the specified output file. You can use this output file as a parameter file for the dcminst, dcmpkget, and dcmpkrm commands.
When this argument is omitted, no output file is created.
-
/LC
In the argument /LC, write ON or OFF to specify whether to continue command processing even if you log off from Windows while executing this command as a background service by using the Task Scheduler or JP1/AJS.
-
ON
Continues command processing even when you log off from Windows.
-
OFF
Forcibly ends command processing when you log off from Windows.
This argument is effective when this command is executed from a service on one of the following OSs:
-
Windows XP
-
Windows Server 2003
When you enter this command from the command prompt, this command is executed as a foreground program. Therefore, in such cases, do not specify /LC ON.
You can also use a registry to set whether to continue command processing even if you log off from Windows.
Note that the command operation differs depending on the combination of the specification of the argument /LC and the setting in the registry. For details, see 13.20 Command operation at logoff according to registry setting and logoff option.
-
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 |
|||
file_path |
Name of packaging-target file |
Y/N |
/P value |
|
base_fullpath |
Path name of packaging base directory |
Y |
/B 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 |
N |
-- |
|
directory |
Installation-target directory |
Y/N |
/D value |
|
condition |
System condition |
Y/N#1 |
/O value |
|
condition |
Package condition |
Y/N#1 |
/l value |
|
condition |
Software condition |
Y/N#2 |
-- |
|
permission |
Restoration of file access permission |
Y/N |
/qY or /qN |
|
expiration_date |
Limit on package storage in relay system |
Y/N |
/x value |
|
expiration_days |
Number of days of package storage in relay system |
Y/N |
/ed value |
|
installation_date_and_time |
Installation date and time |
Y/N |
/d value |
|
installation_timing |
Execution timing |
Y/N |
/tS or /tN |
|
installation_mode |
Installation mode |
Y/N |
/mB or /mG |
|
compress |
Whether to compress |
Y/N |
/uY or /uN |
|
restore |
Whether to restore at upgrading |
Y/N |
/RY or /RN |
|
reboot |
Computer restart after installation |
Y/N |
/reboot |
|
processing_dialog |
Whether to display processing message during installation |
Y/N |
/procS, /procY, or /procN |
|
external_program_executed_before_installation |
External program to be started before installation |
Y/N |
/b value |
|
external_program_executed_after_installation |
External program to be started after installation |
Y/N |
/a value |
|
external_program_error_handler |
External program to be started at installation error |
Y/N |
/e value |
|
external_program_handler |
External program to be started |
N |
-- |
|
exit |
How to report the processing result of external program |
Y/N |
/rbR, /rbM, /raR, /raM, /reR, or /reM |
|
action |
Action to take when processing result is error |
Y/N |
/ybC, /ybS, /yaC, or /yaS |
|
wait |
Monitoring method |
Y/N |
/wbU, /wbT, /wbG, /waU, /waT, /waG, /weU, or /weY |
|
timeout |
Monitoring time |
Y/N#3 |
/n value |
|
wait_code |
Monitoring code |
N |
-- |
Command format without using any parameter file
The following shows the command format to be used when you specify only command arguments without using a parameter file:
dcmpack.exe /k password [/P name-of-packaging-target-file] /B path-name-of-packaging-base-directory /p package-name /I package-ID /v version/revision /G generation-number /c cabinet-name /C cabinet-ID [/D installation-target-directory] [/O system-condition] [/l package-condition] [{/qY|/qN}] [/x limit-on-package-storage-in-relay-system] [/ed number-of-days-of-package-storage-in-relay-system] [/d installation-date-and-time] [{/tS|/tN}] [{/mB|/mG}] [{/uY|/uN}] [{/RY|/RN}] [/reboot] [{/procS|/procY|/procN}] [/b external-program-to-be-started-before-installation [{/rbR|/rbM}] [{/ybC|/ybS}] [{/wbU|/wbT|/wbG}] [/n monitoring-time]] [/a external-program-to-be-started-after-installation [{/raR|/raM}] [{/yaC|/yaS}] [{/waU|/waT|/waG}] [/n monitoring-time]] [/e external-program-to-be-started-at-installation-error [{/reR|/reM}] [{/weU|/weY}] [/n monitoring-time]] [/o output-file-name] [/LC {ON|OFF}]
Return codes
The following table lists the return codes that are output when the dcmpack command is executed:
Code |
Meaning |
Action to be taken |
---|---|---|
0 |
The command ended normally. |
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 could not be created, or automatic incrementing of the version/revision and generation numbers for which reserved words were used failed. The package, however, was registered successfully. |
Check the specified path names of the files to be packaged. |
5 |
Connection to the JP1/IT Desktop Management 2 service failed. |
Check whether the service of JP1/IT Desktop Management 2 - Manager has started. |
6 |
Data communication with the managing server failed. |
Check the communication environment. |
7 |
This code means one of the following:
|
|
9 |
The packaging-target file has already been packaged. |
Change the value of one of the following parameters, and then retry packaging.
|
12 |
Restoration of one or more archive files failed. |
Reference the event log. |
13 |
The password is invalid. |
Check the specified password. |
14 |
Package registration failed because incrementing of the version/revision or generation number exceeded the maximum allowable number of digits. |
Check the settings of reserved words for version/revision and generation numbers. |
Notes
-
Specification of the cabinet
-
If you specify an undefined cabinet ID in the parameter file or corresponding command argument, a new cabinet is created.
-
If you specify different combinations of cabinet ID and cabinet name for installation of multiple packages, the second and subsequent packages are stored in the cabinet indicated by the cabinet ID in the respective combinations. Such a specification does not cause an error.
-
-
Specifiable number of packages
When using either the parameter file or command arguments for specification, you can specify only one package per single execution of the dcmpack command.
-
Automatic incrementing of version/revision and generation numbers
You can automatically increment the version/revision and generation numbers by using reserved words. The incrementing operation varies as described below depending on whether reserved words are specified in the parameter file or they are specified in command arguments.
- When reserved words are specified in the parameter file:
-
The initial values for incrementing are updated when the dcmpack command is executed, and the new values are written to the parameter file by overwriting. The next time the command is executed by using the same parameter file, incrementing begins with the new values.
- When reserved words are specified in command arguments:
-
The initial values for incrementing are not updated even when the dcmpack command is executed. Each time the command is executed, incrementing begins with the initial values.
-
Connection destination of the dcmpack command
The connection destination of the dcmpack command is the server that is connected when you start the Packager as a user who has permission to update the registry HKEY_LOCAL_MACHINE. If you want to change the connection destination, start the Packager as a user who has permission to update the registry HKEY_LOCAL_MACHINE, change the connection destination, and then execute the dcmpack command.
-
Point to be noted when you do not use a parameter file
-
Do not specify a path name that includes a space for an external program.
-
-
Point to be noted when you have newly installed the Packager
When you have newly installed the Packager, before executing the dcmpack command, start the Packager and specify the server to be used
-
Point to be noted on the background installation mode
When the background installation mode is used, do not specify a network drive as the installation-target directory.
Example
The following example shows use of this command to package the files stored under the directory C:\Finance\data0401, by using the package name and cabinet name described below.
-
Package name
Finance Data 2003 4
-
Name of the storage-destination cabinet
FCAB01
- Creating the parameter file
-
Create the following parameter file:
** dcmpack Parameter File Sample PACKAGING_SOURCE{ file_path=FD200304.dat base_fullpath= C:\Finance\data0401 } PACKAGING_INFORMATION { package_name=Finance Data 2003 4 package_id=FD200304 version_revision=000001 generation=0000 cabinet_name=FCAB01 cabinet_id=F1 package_code=P } SYSTEM_CONDITIONS{ condition=H:c>=300 directory=C:\Finance } USER_PROGRAM_INSTALLATION_CONDITIONS { external_program_executed_after_installation = C:\Dmbat\app\normal_exit.exe }
- Executing the command
-
When the created parameter file is stored as C:\Dmbat\para.txt, specify the command as follows:
dcmpack.exe /i C:\Dmbat\para.txt