![Step-by-Step Guide: File Removal During Uninstallation with WiX Toolset](https://thmb.techidaily.com/acfc08d56b4206022979b3dc0ecd7952203549957dd5b874ab0b46f7e315b993.jpg)
Step-by-Step Guide: File Removal During Uninstallation with WiX Toolset
![](/images/site-logo.png)
Step-by-Step Guide: File Removal During Uninstallation with WiX Toolset
Inno Setup
WiX Toolset
InstallShield
MSIX Packaging Tool
Check your inbox and confirm the
subscription
Exclusive Newsletter
Exclusive Newsletter
Get the latest WiX insights direct to your inbox. Subscribe now!
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
How to Remove Files on Uninstall Using WiX Toolset
When uninstalling an application, Windows Installer removes by default only the files that were created during the installation process. But, how about the files that are created after the installation?
In this article, we will see how to remove the files created after the installation using WiX Toolset.
How to remove files by adding a new component to an existing Component Group in WiX Toolset?
First, you need to add a new Component in an existing Component Group or create a new Component Group altogether – which will need to be referenced in one of the installer’s features.
Let’s imagine that you want to delete a file (sample.txt) that was created by the application in the Install Folder. To delete it, you have to add a new Component to the component group that manages the Install Folder.
Copy
For this code to work, you have to replace the wildcard from the Guid property with a brand new Guid.
Alternatively, you can replace both the name and the extension of the file, in the Name property, with wildcards, making the installer delete the following:
- only the files having a certain name, by replacing the extension with a wildcard
- only the files having a certain extension, by replacing the name with a wildcard
- all the files, by replacing both the name and the extension with wildcards
The RemoveFile element removes a file if the parent component is selected for removal.
How to remove files on uninstall using Advanced Installer?
Here is how you can remove the files created after the installation with Advanced Installer.
1. Go to the Files and Folders page, and add a new File Removal.
To use the File Operations feature in Advanced Installer, you need to have a Professional license or higher. Start with our 30-day full feature trial .
2. In the New File Removal Dialog, fill in the Name field with the name of the file you want to be deleted.
3. For the Component field, you can choose any component you want.
4. In the Remove On field, choose the Component uninstall option
5. And for the Condition field, use the REMOVE=”ALL” condition.
That’s it!
Conclusion
As you see, you can choose between two different approaches when it comes to deleting files during the uninstall process. It is up to you to decide.
If you prefer to configure your packages through the use of XML, you should go with the WiX Toolset. But if you want a fast and efficient solution, then the option of using the GUI that comes with Advanced Installer is for you.
Advanced Installer #1 alternative to the WiX Toolset
We decided to focus on our main goal to save precious time of our developers.
HANS-LEO TEULINGS
PHD – CEO, NEUROSCRIPT, LLC
You might find useful:
- CAB Embedding Options in MSI
- Updated installers in WiX Toolset
- Custom Actions In WiX Toolset
- Windows Services with WiX Installer
- Set WiX Installer Version to the Current Build Version
- Remove Files and Folders when Uninstalling with WiX
- How to set a WiX Toolset custom action to run only on uninstall
- How to create non-advertised shortcuts for all users / per machine with WiX Toolset
- How to Remove Files on Uninstall Using WiX Toolset
- How to create major upgrades for MSI packages using WiX Toolset
- How to pass CustomActionData to a CustomAction using WiX
- How to build an installer without a license page using WiX Toolset
- How to create a WiX KeyPath attribute
- How to Create a Desktop Shortcut using WiX Toolset
- How to Use WiX MSI to Update an Installed Application
- How to correctly set the install folder in Wix
- WiX Toolset Visual Studio Extension
- How to create a custom dialog in WiX for user input
- How to create an MSI installer with WiX
- How to use WIX MSI to do a silent install or uninstall of a web app
Get the most from packaging with Advanced Installer
Try the 30-day fully-featured edition absolutely free!
No credit card required
Also read:
- [Updated] In 2024, DailyMovement vs Youtube Income Comparison
- [Updated] In 2024, Perfect Guide for Linking Instagram to TikTok
- 2024 Approved Edit Away Bloat Organizing Your Overflow of TikTok Saves
- Cookiebot-Driven Data Collection Solutions
- Cookiebot-Driven Marketing Success Strategies
- Cookiebot-Driven: Unleashing the Power of Personalized Tracking
- Cookiebot-Enabled Analytics: Powering Your Digital Experience
- Cookiebot-Enabled: Enhance Your Website with Advanced Tracking Solutions
- Cookiebot-Enabled: Enhance Your Website's Analytics Effortlessly
- How To Remove iCloud On Apple iPhone SE Smoothly
- Leading Selection of 10 Free Video Subtitle Extractors for 2024
- Maximizing Viewership with Effective Game Streaming for 2024
- Pattern Locks Are Unsafe Secure Your Realme Narzo 60 5G Phone Now with These Tips
- Unleash Creative Potential Applying Effects and Filters on Zoom
- Title: Step-by-Step Guide: File Removal During Uninstallation with WiX Toolset
- Author: Donald
- Created at : 2024-09-30 18:26:53
- Updated at : 2024-10-03 17:17:32
- Link: https://some-tips.techidaily.com/step-by-step-guide-file-removal-during-uninstallation-with-wix-toolset/
- License: This work is licensed under CC BY-NC-SA 4.0.