DeleteFiles

Got a problem you cannot solve? Try here.
cdmackie
Posts: 4
Joined: Mon Feb 28, 2005 1:09 pm

DeleteFiles

Postby cdmackie » Mon Feb 28, 2005 1:15 pm

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.

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Mon Feb 28, 2005 6:08 pm

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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 74 guests