Pranoti Chinchkar
Pranoti Chinchkar

Reputation: 1

unable to remove file using WIX tool

I am trying to remove file using .wxs file (WIX Tool) on install, but it is not removing anything.

Please check below command and let me know where it is wrong?

<Component Id="Comp" Guid="MYGUID" Directory="test">
    <RemoveFile Id="rem1" Name="*.zip" On="uninstall" />
</Component>

Upvotes: 0

Views: 163

Answers (1)

Ahmad
Ahmad

Reputation: 455

Use RemoveFile Element On="uninstall". Here's an example:

<Directory Id="CommonAppDataFolder" Name="CommonAppDataFolder">
  <Directory Id="MyAppFolder" Name="My">
    <Component Id="MyAppFolder" Guid="*">
      <CreateFolder />
      <RemoveFile Id="PurgeAppFolder" Name="*.*" On="uninstall" />
    </Component>
  </Directory>
</Directory>

Hope this is helpful :)

Upvotes: 1

Related Questions