7.2.3 Replacing Configuration Files

7.2.3.1 Components for Configuration Files

The OpenAFS configuration files (CellServDB) can be replaced by your own configuration files. These files are contained in separate MSI components so that you can disable them individually.

The recommended method for replacing these files is to first disable the components containing the configuration files that you want to replace, and then add new components for the replacement files. This is outlined below (assuming you are using ORCA.EXE to author the transform).

Note that transforms are not a good way to add a new file as an embedded stream. The method outlined here places the file in the same directory as the MSI for deployment.

The walkthrough below is to add a custom 'CellServDB' file.

  1. Disable the component that contains the configuration file that you want to replace.

    1. Locate and select the 'Component' table in the 'Tables' list.

    2. In the Component table, locate the component you need to change ( Ctrl-F invokes the 'Find' dialog). The component names are listed below in section 7.2.3.1. For this example, the component name is 'elf_CellServDB'.

    3. Go to the 'Condition' column of the component.

    4. Enter a condition that evaluates to false. I.e. 'DONOTINSTALL'. (Note that an undefined property always evaluates to false).

      Note that you can also use this step to disable other configuration files without providing replacements.

  2. Add a new component containing the new configuration file.

    1. Select the 'Component' table in the 'Tables' list.

    2. Select 'Tables'->'Add Row' (Ctrl-R).

    3. Enter the following :

      Component

      cmf_my_CellServDB

      ComponentID

      {7019836F-BB2C-4AF6-9463-0D6EC9035CF1}

      Directory_

      dirClient

      Attributes

      144

      Condition

      KeyPath

      fil_my_CellServDB

      Note that the ComponentId is an uppercase GUID. You can generate one using GUIDGEN.EXE or UUIDGEN.EXE, both of which are included in the Platform SDK.

      The Attributes value of 144 is a sum of msidbComponentAttributesPermanent (16) and msidbComponentAttributesNeverOverwrite (128). This ensures that local modifications are not overwritten or lost during an installation or uninstallation. These are the same settings used on the default configuration files.

      'fil_my_CellServDB' is a key into the 'File' table which we will fill later.

  3. Add a new feature to hold the new component.

    1. Select the 'Feature' table.

    2. Add a new row (Ctrl-R or 'Tables'->'Add Row') with the following values:

      Feature

      fea_my_CellServDB

      Feature_Parent

      feaClient

      Title

      Description

      Display

      0

      Level

      30

      Directory_

      Attributes

      8

      It is important to create the new feature under the 'feaClient' feature, which will ensure that the configuration file will be installed when the client binaries are installed.

      Setting 'Display' to 0 will hide this feature from the feature selection dialog during an interactive installation. A value of 30 for 'Level' allows this feature to be installed by default (on a 'Typical' installation).

      The 'Attributes' value is msidbFeatureAttributesDisallowAdvertise (8), which is set on all features in the OpenAFS MSI. The OpenAFS MSI is not designed for an advertised installation.

  4. Join the component and the feature.

    1. Select the 'FeatureComponents' table.

    2. Add a new row with the following values:

      Feature

      fea_my_CellServDB

      Component

      cmf_my_CellServDB

  5. Add an entry to the 'File' table.

    1. Select the 'File' table.

    2. Add a new row with the following values:

      File

      fil_my_CellServDB

      Component_

      cmf_my_CellServDB

      FileName

      CellServDB

      FileSize

      (enter file size here)

      Attributes

      8192

      Sequence

      1000

      (leave other fields blank)

      The 'Attributes' value is msidbFileAttributesNonCompressed (8192). This is because we will be placing this file in the same directory as the MSI instead of embedding the file in it. Transforms do not support updating compressed sources or adding new cabinet streams.

      Finally, the 'Sequence' value of 1000 will be used later to distinguish the file as being in a separate source location than the other files in the MSI.

  6. Set a media source for the file.

    1. Select the 'Media' table.

    2. Add a row with the following values :

      DiskId

      2

      LastSequence

      1000

      (leave other fields blank)

      The sequence number of 1000 designates this as the media source for the newly added file.