Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can i remove files write on the c drive appdata folder, when i uninstall application.

What I have tried:

i create winforms installer using setup project using visual studio 2013. But when i install the installer the application will install to program files in c drive,but i need to write some file, but this folder does not provide permission to write, because of this problem .i try to write files to appdata folder in c drive.

But when i uninstall application ,the files write in the appdata folder does not remove after uninstalation.
Posted
Updated 26-Apr-16 4:32am
Comments
Sergey Alexandrovich Kryukov 26-Apr-16 9:52am    
It all depends on what you are using as a toolbox, but this is a very usual step. Usually optional.
Installers usually require elevated permissions; and this is one of the options of your installer project.
What does it even mean, "WinForms installer"?
—SA
Rahul s menon 28-Apr-16 5:52am    
I meant MSI installer

1 solution

Best practice is to leave any data behind. Your installer is not responsible for it. The user may need to use the data in another program or even in an upgraded version of the application.

But, if you really need to remove it, then you'd have to build a custom action to go delete it. An MSI installer, outside of a custom action, cannot touch any files it didn't lay down through normal means.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900