How do I remove files from the application data directory on uninstall?

I have several files and folders that I create in the Application.CommonAppDataPath directory during runtime. How can I have my deployment project remove these files on uninstall?

Presently: I have a subclassed instance of System.Configuration.Install.Installer that has the Uninstall method overridden, but I can find no way to get the application data path of the original application; Application.CommonAppDataPath simply returns the path to the Microsoft Installer.

Answers


You can try to manually go into the application data directory by using the string path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); then grab all the files you want to delete and delete them manually.


Need Your Help

Problems setting up Grails 2.3.5 App on Heroku with ClearDB

grails heroku cleardb

I am setting up a Grails 2.3.5 App on a Heroku Server and I keep getting the following error when tomcat starts up:

“Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index”

c#

For creating a list with 100 random number between 0 and 1 I wrote below code that I receive the error.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.