PDA

View Full Version : Uninstall deleting dir it didn't create


bab
11-21-2003, 10:58 AM
I have a product install that has to copy a file to a directory of another product (Java runtime area). The install works just fine and places the file where it belongs in the JRE directory.

The problem is that during the uninstall, it correctly deletes the file but then also deletes the containing directory because it is now empty. This does not seem to me to be correct behavior since I didn't create the directory during the install.

Any suggestions? Is there some extra step I need to take?

Thanks,
Barb

Brett
11-21-2003, 11:29 AM
That is how the uninstall works when removing files. It always tries to remove folders after deleting files. Here are two workarounds:

1. Go to the After Uninstalling tab of the Uninstall screen and add a Create Directory action to re-create the folder if it is not there at the end of the uninstall.

2. Go to the file properties of the file in question and on the Advanced tab select the "Never remove" option. Then go to the After Uninstalling tab of the Uninstall screen and add a Delete File action to remove the file.

bab
11-21-2003, 12:30 PM
Brett, thanks for your quick reply.

I do agree that the general behavior is correct when the folder is created by the install. But in this case the folder already exists and my install is just adding a file to it. I guess my expectation was that the uninstaller would only remove items it created.

For my situation, I think option one will be a reasonable solution to the problem.

Thanks again,
Barb