views:

378

answers:

1

I have an application that is installed on the clients v.8.0. I have made a new version 9.0 and want to use RemovePreviousVersions to remove the old version and install the new one. I have custom actions setup up in the v.8.0 to clear out all of the directories that were created while the app was being used. In my v.9.0 I have a custom action that copies directories from the CD it is being installed from to the install directory. There seems to be a timing issue when the custom actions are called to remove v.8.0 and install v.9.0. I can see all the directories getting copied over for the custom action in v.9.0 and then I can see them getting deleted when the uninstall custom action of v.8.0 runs. Shouldn't RemovePreviousVersions remove the old version before attempting to install the new version? Is this a bug or am I doing something wrong. Can someone shine some light on this for me please.

+2  A: 

Found my answer. This link explains it all:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=358437

Wili
It explains the problem quite well, but not the solution! Did you basically replicate the uninstall() code in the beginning of your install() custom action?
MattH
What I did to get around the issue was in v.9.0 I put the files in a different folder location. in v.8.0 they were in "documents\" and in v.9.0 I put the files in "resources\documents\" This allowed the custom action in v.8.0 to delete the files without harming the v.9.0 files.
Wili

related questions