Deleting Application Configuration file when Un-installed

Z

zacks

I have an application that stores its configuration file in the user's
Local Application special folder in a subfolder COMPANYNAME
\PRODUCTNAME. The application creates the file the first time the
application is run. The application is installed with a setup project
in the application solution. If I uninstall the application in the
Control Panel Add/Remove programs applet, the configuration file is
left in place.

Is there any way I can configure the setup project so that when the
application is uninstalled the configuration file is deleted?
 
N

Nicholas Paldino [.NET/C# MVP]

Hmm, could you install the file as part of the install, and then modify
it when the app is first run? This way, the file is listed in the manifest
for the install package, and should delete the file when you uninstall.
 
Z

zacks

    Hmm, could you install the file as part of the install, and then modify
it when the app is first run?  This way, the file is listed in the manifest
for the install package, and should delete the file when you uninstall.

Such a simple solution. How come I didn't think of it? :)

Thanks.
--
          - Nicholas Paldino [.NET/C# MVP]
          - (e-mail address removed)




I have an application that stores its configuration file in the user's
Local Application special folder in a subfolder COMPANYNAME
\PRODUCTNAME. The application creates the file the first time the
application is run. The application is installed with a setup project
in the application solution. If I uninstall the application in the
Control Panel Add/Remove programs applet, the configuration file is
left in place.
Is there any way I can configure the setup project so that when the
application is uninstalled the configuration file is deleted?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top