I can't seem to get the DeleteFiles function to work. I am trying to delete the folder in Docs and Sets\\<username>\\Application Data\\My Company\\My Product and calling DeleteFiles() during my uninstall, but it doesn't seem to do anything.
I tried just setting DeleteFiles to delete "c:\\temp\\test" and that didn't do anything either. Am I doing somthing wrong? And does it delete recursively?
Thanks.
Colin.
DeleteFiles
This is a common source of confusion. What you need to do is the following:
1) Cut the command that executes in the uninstall routine
2) Paste it into your install routine
3) The command has two check boxes: "delete on install" and "delete on uninstall". Make sure only the latter one is checked.
Because of the way MSI works, this counter-intuitive way is the right way to do this. Think of it as "scheduling" the command for execution during uninstallation. Please read the help file topic "Getting Results\\Setup Commands Preceding Apply Uninstall" for more information - it does a great job of explaining exactly what's going on and why it works this way.
Let me know if you need more help!
Sinan
1) Cut the command that executes in the uninstall routine
2) Paste it into your install routine
3) The command has two check boxes: "delete on install" and "delete on uninstall". Make sure only the latter one is checked.
Because of the way MSI works, this counter-intuitive way is the right way to do this. Think of it as "scheduling" the command for execution during uninstallation. Please read the help file topic "Getting Results\\Setup Commands Preceding Apply Uninstall" for more information - it does a great job of explaining exactly what's going on and why it works this way.
Let me know if you need more help!
Sinan
Who is online
Users browsing this forum: No registered users and 74 guests