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] [/split /tempdir temporary-folder-name [/splitfilesize size-of-files-after-split]]
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.
-
/split
Specify this argument to split a file or folder larger than 2 gigabytes and distribute it.
-
/tempdir
Specify the name of the temporary-file output folder, which is used when a file or folder larger than 2 gigabytes is split and distributed.
-
/splitfilesize
Specify the size of pieces into which a file larger than 2 gigabytes is split, in bytes. The possible values range from 1,024 to 1,073,741,824. When the argument is omitted, it is set to 1,073,741,824 (1 gigabyte).
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, #2 |
/O value |
|
condition |
Package condition |
Y/N#1, #2 |
/l value |
|
condition |
Software condition |
Y/N#3 |
-- |
|
permission |
Restoration of file access permission |
Y/N |
/qY or /qN#4 |
|
expiration_date |
Expiration date of package storage on relay computer |
Y/N |
/x value |
|
expiration_days |
The relay computer holds relayed packages for |
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 |
|
compress_type |
Compression mode |
Y/N |
/ctN or /ctH#5 |
|
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#2 |
/procS, /procY, or /procN |
|
external_program_executed_before_installation#6 |
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#7 |
External program to be started at installation error |
Y/N |
/e value |
|
external_program_handler |
External program to be started |
N |
-- |
|
exit#7 |
How to report the processing result of external program |
Y/N |
/rbR, /rbM, /raR, /raM, /reR, or /reM |
|
action#7 |
Action to take when processing result is error |
Y/N |
/ybC, /ybS, /yaC, or /yaS |
|
wait#7 |
Monitoring method |
Y/N |
/wbU, /wbT, /wbG, /waU, /waT, /waG, /weU, or /weY |
|
timeout |
Monitoring time |
Y/N#8 |
/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 expiration-date-of-package-storage-on-relay-computer] [/ed the-relay-computer-holds-relayed-packages-for] [/d installation-date-and-time] [{/tS|/tN}] [{/mB|/mG}] [{/uY|/uN}] [{/ctH|/ctN}] [{/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] [/split /tempdir temporary-folder-name [/splitfilesize size-of-files-after-split]]
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. |
23 |
The size of the file to be split is smaller than the size of files after split. |
Specify the size of files after split, smaller than the size of the file to be split. |
32 |
An error occurred when the split file was output. |
Check the existence of the folder specified by the /tempdir argument, the access permissions to that folder, and the free space of the folder. |
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.
-
If the distribution destination is a workstation (UNIX system), specify any drive as the drive of the directory where external programs are to be stored or installed. However, the specified drive will be ignored during distribution, and external programs will be distributed according to the specified directory. In the following example, the drive name c: is ignored.
Example: c:/user/tmp
When you use a backslash (\) to separate each directory, there is no need to specify a drive name.
Example: \user\tmp
-
-
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.
-
Point to be noted when /split is specified
-
Before executing the dcmpack command, check that the folder you specify in the /tempdir argument has more free space than the size of the file before split.
-
When you execute the dcmpack command, the folder below is created as a temporary file area. Do not delete this folder during command execution.
temporary-folder-specified-in-the-tempdir-argument\process-ID#
#: Process ID of the dcmpack command.
The temporary file area is deleted automatically after the command ends.
-
A file can be split into 255 pieces maximum. We recommend that you create a new cabinet for registering split files as a package.
If the number of split files exceeds the maximum number, an error indicated by the return code 12 occurs.
Note that if the cabinet you are going to register the package with already has some packages, the maximum number of split files decreases by the number of the registered packages.
-
Specify the package name within 46 single-byte characters (23 double-byte characters). And specify the package ID between 1 and 40 characters.
-
If the dcmpack command abnormally terminates with one of the return codes 3 to 14, or with 32, follow the procedure below to delete the temporary files and the package, and then re-execute the dcmpack command.
Deleting the temporary files:
Delete the files that remain under the folder specified in the /tempdir argument.
Deleting the package:
Delete the packages with the package name of package-specified-by-the-/p-value-argument-or-package_name-in-the-parameter-file.serial-number that are registered with the cabinet specified in the parameter file or the command argument. For details about how to delete the package, see 7.4.5 Deleting cabinets and packages or 13.12 dcmpkrm.exe (deleting a package).
-
The version/revision and generation number of the package to be registered are not incremented automatically. When \increment-value[:start-value] is specified for the /v argument, /G argument, or version_revision and generation in the parameter file with the /split argument specified, the value specified in:start-value is used. If :start-value is omitted, 0 is used.
-
More than one package with a sequence number starting from 001 added to each package is registered with the package name (package_name parameter in the parameter file or /p value command argument) and package ID (packageid parameter in the parameter file or /I value command argument). The following table lists the installation of which package in the value specified in the parameter file or command argument is followed by the operation:
Parameter
Applicable argument
Operational timing
external_program_executed_before_installation
/b
An external program is executed after the first package of the split packages is installed.
external_program_executed_after_installation
/a
An external program is executed after the last package of the split packages is installed.
external_program_error_handler
/e
An external program is executed when errors occurred during the installation of all the split packages.
reboot
/reboot
The restart is executed after the last package of the split packages is installed.
Note that when the installation script is packaged and distributed after distribution, as described in 7.6.14 (2) Example of distributing a large Windows 10 update, use the installation script for restart, without using the reboot parameter in the parameter file or /reboot command argument.
If you want to use the installation script for restart, do not set the Monitoring time to 0 (not monitored).
-
The setting to indicate whether to restore at upgrading (the restore parameter in the parameter file or the /R command argument) is disabled. Even if you specify Y to restore parameter or /RY in the command argument, a program product or software is not restored when it is upgraded.
-
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