I have an MSI installer package that install the .net application. It also installs the Uninstall.bat file that does the uninstallation through the msiexec/x option. But it does not delete the user.config file created in the users Local Settings\Application Data folder\Company Name\Product folder.
I am not sure as to how do I do that as I am not able to figure out any option in the Installer itself.
I can create another batch file that can do the job but not sure if this would be the right way. Also, if I try doing it with Batch file, how would I find out the current user to reach to the correct folder? I don't want to make it too complicated. Is there an easy way of doing it.
Please suggest.
I got it to work. I created a new Console project 'UninstallHelper' in the Solution. Added an InstallerClass in the UninstallHelper project. I am overriding the OnBeforeUninstall method:
Now I add the Primary OutPut of this project in the installer. And finally, I add a Custom Action in Uninstall as the Primary Output from UninstallHelper project.
This did the trick for me.