I have requirement of renaming few files during uninstallation of my application. This should not happen while reinstalling or modifying. I did following for this :
1. I prepared one property called "ISREPAIR" set to "default" as default value in Property table.
2. Wrote three custom actions - repair_selected, remove_selected, modify_selected. In all these three custom actions I am changing the value of ISREPAIR to "yes", "no" and "modi" respectively.
3. I called appropriate custom action in Next button of Maintainance Type dialog box depending on which option is selected by user.
4. Wrote custom action to rename file which I wanted to rename. And put condition (Installed) AND (ISREPAIR="no"). Thus this custom action will run only during uninstallation.
Now, it works fine on NT when you uninstall but doesnot work on 2000, because when you say "remove" from "Add/Remove program" in 2000 it doesnot give any GUI to user and just uninstalls the product. In this case no one of my custom actions get fired.
What should be the solution ?
Regards,
Devang.