- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Custom Action to Delete a Folder and it's contents that wasn't installed by Installer
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
I'm hoping someone might be in a position to help me.
We have recently adopted Microsoft Edge WebView2 in our product.
https://developer.microsoft.com/en-us/microsoft-edge/webview2/
This now creates a Folder within our Product:
C:\Program Files\Company Name\Software\Program.exe.WebView2\EBWebView
However, once we uninstall, this folder is being left behind where there are 281 Files and 140 Folders in this directory. Some of these files have a cache name, so I imagine the names might differ from machine to machine.
I can't used the RemoveFiles functionality as it expects the folder to be empty to be able to remove the folder.
What would be the best way to remove this folder and all it's contents when uninstalling our program?
Thanks.
Indirectly we found another solution to our problem which stops the folder being created along side our Installation directory in the first place, therefore I don't need to worry about removing it at all.
Thanks for you help
You can try using customaction to delete this folder and its content,
Please refer our installscript sample code for delete dir which will be helpful
you need to sequence it in installexec sequence with condition REMOVE=ALL, so that it wil run only on uninstallation.
Please refer below link for customaciton conditions
Thanks.
Indirectly we found another solution to our problem which stops the folder being created along side our Installation directory in the first place, therefore I don't need to worry about removing it at all.
Thanks for you help