How do I remove files during an uninstall?

Article:HOWTO2790  |  Created: 2005-09-14  |  Updated: 2006-11-10  |  Article URL
Article Type
How To

How do I remove files from the destination computer during uninstall?


There are times when an application creates custom files that do not exist in the original installation. If Windows Installer did not install the files, they remain on the destination computer after uninstall. If you know the name and location of these custom files, modify the installation to remove them during uninstall. Beginning with Wise for Windows Installer 5.0, Wise for Visual Studio .NET 5.0 and the Windows Installer Editor in Wise Package Studio 4.5, the Files page in Installation Expert provides a Remove File operation. Using this operation avoids the need to populate the RemoveFile table manually or to create a custom action.

To remove a file during uninstall:

  1. Click the Operation button on the Files page in Installation Expert and select Remove File.
    The Remove File Details dialog appears.
  2. Complete the following fields in the Remove File Details dialog:
    • Directory: Select the destination directory from the drop-down list for the files to be removed. If the directory is not in the list, select the appropriate parent directory, click New Folder, input the name in the New Folder Name field, and click OK.
    • File Name: Input the name of the file to remove. To remove multiple files with the same extension, use wildcards. For example, input *.txt to remove all text files.
    • All Files: Mark this check box to remove all files from the Directory.
    • Remove During Uninstall: Select uninstall from the drop-down list to remove the files during uninstall.
  3. Click OK to close the Remove File Details dialog.
  4. Save and compile your installation.

During uninstall, Windows Installer removes the file designated.  

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices