Effortless Deletion of Files in Uninstall Processes via the WiX Toolset Methodology
Effortless Deletion of Files in Uninstall Processes via the WiX Toolset Methodology
Inno SetupWiX ToolsetInstallShieldMSIX 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:
- [New] Auditory Artistry Access to Excellent DJ Video Samples
- [New] In 2024, The Premier Webcam Lineup for Next-Gen Windows PCs
- [Updated] 2024 Approved Your Ultimate YT Shorts Companion
- [Updated] Easy & Speed Share YouTube Playlists Now for 2024
- [Updated] Uncovering the Ultimate Screen Recorder Compare and Choose (OBS/Fraps)
- Achieve Superior Outcomes: Mastering DALL-E 2 in 5 Steps
- Advancements in AI Communication: Exploring the Improved Conversational Capabilities of ChatGPT's GPT-4
- AI Powered YouTube's New Feature: Quick Video Previews & Summaries
- Boost Your Linux Skills with Tips From ChatGPT - A Personal Experience
- Discover Cutting-Edge Results with Our Latest AI-Enhanced Google Search
- Electric Vehicle Charging Issues: Unraveling the Top 8 Causes of Connection Failures
- Electrifying News: Volkswagen Adopts Tesla-Compatible Charging Stations for Future Models
- Embracing the Reality: Electric Vehicle Ranges May Remain Stable for Now
- Enhancing TikTok Profiles with Linktree Features
- Full Guide to Hard Reset Your Motorola Defy 2 | Dr.fone
- In 2024, Free Download Filmora 13 Video Editing Made Easy
- Microsoft's Innovation Unveiled: AI Companion for Windows 11 Enhanced Productivity
- Top Drone Picks: Unveiling the Ultimate Flyers of 2024
- Top Solutions for Restoring Audio on Your Toshiba Laptop
- Title: Effortless Deletion of Files in Uninstall Processes via the WiX Toolset Methodology
- Author: Donald
- Created at : 2024-09-27 18:39:30
- Updated at : 2024-10-03 19:46:06
- Link: https://some-tips.techidaily.com/effortless-deletion-of-files-in-uninstall-processes-via-the-wix-toolset-methodology/
- License: This work is licensed under CC BY-NC-SA 4.0.