Examples how to use Files.sxp

To parameterize an SXP product, you must edit both the product archive and the parameter archive.

Edit the Product Archive

If the product you are packaging contains any kind of configuration file, such as *.cnf, that you intend to parameterize, you must edit the files.sxp file after you install the product on the Packaging Computer. In this example, you edit the organization.cnf file in order to parameterize it and adapt it for use at your site.

  1. Start packaging the product and continue until you have installed the product as part of the packaging process. If you are using the automatic method, you should stop at the Installing a Version dialog, after you have installed the product, but before you click Continue.
  2. Edit the file (that is, organization.cnf) using a text editor such as Notepad.

    In the organization.cnf file, replace the keyword, Sales Department, with the parameter, $(Department).

  3. Finish the packaging process.
  4. Edit the files.sxp file: In the ReplaceParams section, add the path name of the modified configuration file, for example, $(SxpRootDir1)\organization.cnf.

    The Installer checks all listed product files for parameters.

    Alternatively, after packaging, you can use the CMP Editor to edit the packaged product, whose files are compressed in files.cmp. Using the CMP Editor is the only method to edit the files.cmp file.

Edit the Parameter Archive - General Steps

The following general steps ensure that the parameters you entered can be replaced by real values on the target computers:

  1. Create the desired client parameters, for example Department. The parameter names must match the parameter names used in the SXP package.
  2. Create groups and PCs. The PC names must match the names of the target computers. For instructions, see Modifying Default Parameters for Computer Groups and Individual Computerspar_gruppe.
  3. Define the default values for these parameters. If required, define the group‑specific and PC‑specific values also.
  4. Create a parameter product. To create a parameter product, select Edit, Parameter, create parameter product from the Client Parameters dialog. On the Create Parameter Product dialog, enter the name and version number you want to assign to the parameter product and click OK.
  5. Register the parameter product to the Software Package Library.
  6. Distribute the parameter product to the target computers.

Edit the Parameter Archive - Specific Steps for this Example

The following steps are the same as the general steps shown above, except that they have been modified for this example. Follow these steps to ensure that the parameters you entered can be replaced by real values on the target computers:

  1. In this example, the value human-resources is assigned to the Department parameter. Create the parameter Department with a default value. Add group icons called dep-h-resources and dep-financials.
  2. In these groups, create PC icons with the same names as the target computers. (These names must match the name entry in the Identity section of the SxpEngxx.ini file.)
  3. In the dep-h-resources group, change the value of Department to human-resources. In the dep-financials group, change the value of Department to financials.
  4. Create a parameter product.
  5. Register the parameter product.
  6. Distribute to the target computers.

During installation on the target computer, the Installer resolves the parameter Department in the organization.cnf file. For all target computers in the dep-h-resources group, the parameters are replaced with the value human-resources. For all target computers in the dep-financials group, the parameters are replaced with the value financials.

Organization.cnf File before Installation

The contents of organization.cnf file after installation follows. The contents vary according to the group to which the target computer was assigned:

Product file on the Target Computer Assigned to Department: $(Department)
(Files.sxp File:)
#Sign#
ArchiveName=ReplPar
Release=1000
SXP=1.0
#ReplaceParams#
$(SxpRootDir1)\Organization.cnf
#CmpArchives#
files.cmp
#FilesInArchives#
$(SxpRootDir1)\Organization.cnf

Organization.cnf File after Installation

For PCs that are assigned to the dep-h-resources group:

Product file on the target computer assigned to department: human-resources

For PCs that are assigned to the dep-financials group:

Product file on the target computer assigned to department: financials.