Naseef Chowdhury
Naseef Chowdhury

Reputation: 2464

How to delete installation directory when program is uninstalled by visual studio installer project?

I have created an installer using visual studio 2010 installer project. The program installs correctly and works fine for all the features.

But the problem is in uninstallation, when I uninstall the program it does not delete the application directory from file system but deletes the contents of it.

Suppose I am installing the program in C:\Program Files\MyApp, it deletes the contents of MyApp folder but doesn't delete the folder it self.

Any way to do this? If there is a way then how to do this?

Upvotes: 0

Views: 2878

Answers (1)

jbudreau
jbudreau

Reputation: 1307

Does your application create files in this directory after it's been installed? If so, you might want your app to move that user-data to a more user-data-centric location like %PROGRAMDATA% so that application files and user-data are separated.

It also helps to make sure uninstall cleans up everything, and it's easier to persist user-data across upgrades.

Relevant thread - http://www.itninja.com/question/delete-folders-after-uninstall

Upvotes: 1

Related Questions