Deleting Application Configuration file when Un-installed

  • Thread starter Thread starter zacks
  • Start date Start date
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?
 
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.
 
    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?
 
Back
Top