How to manually populate the RemoveFile table without a GUI

Article:HOWTO6351  |  Created: 2005-10-18  |  Updated: 2006-11-22  |  Article URL http://www.symantec.com/docs/HOWTO6351
Article Type
How To



Question
How do I manually populate the RemoveFile table without using Installation Expert?

Answer

Removing an existing file during an installation through the RemoveFile table:

During an installation, you might want to remove existing files from the destination computer. This article outlines the steps to populate the RemoveFile table manually. This can also be done through the GUI interface in Installation Expert's Files page, by selecting the Operation button then the Remove File option.

To manually add a component, create a property to hold the location to find the file and populate the RemoveFile table follow the steps below:

Create a component:

  1. Create or open an installation in Wise for Windows Installer or the Windows Installer Editor.
  2. Go to the Components tab in Setup Editor.
  3. Add an empty component by right-clicking the Components icon and selecting New > Component.
  4. In the Component Details dialog box, enter a name in the Component field. Accept the defaults for the remaining fields. Click OK.
  5. The Select Feature(s) to Assign Components to dialog will appear if the installation contains multiple features. If you want the file to be removed during every installation, check the box next to a feature that will always be installed to the destination computer.

Create a property to hold the path to the file:

  1. Go to the Product tab in Setup Editor.
  2. Right-click the Properties icon and select New > Property.
  3. In the Property Settings dialog box, enter a property (all uppercase) in the Property field.
  4. In the Value field, enter the directory path on the destination computer that contains the file you want to delete. For example, C:\Program Files\MyFolder.
  5. Click OK.

Populate the RemoveFile table:

  1. Go to the Tables tab in Setup Editor and select the RemoveFile table.
  2. In the left pane, right-click on the RemoveFile table and select New > Row to create a new row.
  3. In the new row that appears in the right pane, enter the following fields:
    1. FileKey: Enter any unique value.
    2. Component: From the drop-down list, select the name of the component that you created.
    3. FileName: Enter the name of file you want to delete.
    4. DirProperty: Enter the name of the property that contains the file pathname as a value, for example XYZ.
    5. InstallMode: Enter one of the following depending on your preference:  
      1=Remove only when the associated component is being installed.        
      2=Remove only when the associated component is being removed.       
      3=Remove in either of the above case.

Note: Windows Installer will not delete a folder if files are in the folder. To first remove the files then the folder, you will need to add two entries following the steps above and populating the FileName field as shown below:  

  1. The first entry would delete all files to ensure that the target folder is empty. Entering an * (asterisk) as a wildcard in the FileName field will remove all the files from the folder. 
  2. The second entry removes the empty folder. Leaving the FileName field empty will delete an empty folder.

Legacy ID



3173


Article URL http://www.symantec.com/docs/HOWTO6351


Terms of use for this information are found in Legal Notices