473,486 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Deleting Application Configuration file when Un-installed

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?
Jan 24 '08 #1
2 1948
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<za***@construction-imaging.comwrote in message
news:49**********************************@j20g2000 hsi.googlegroups.com...
>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?

Jan 24 '08 #2
On Jan 24, 2:32*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
* * 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]
* * * * * - m...@spam.guard.caspershouse.com

<za...@construction-imaging.comwrote in message

news:49**********************************@j20g2000 hsi.googlegroups.com...
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?
Jan 24 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8754
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
2
3429
by: kathy | last post by:
What Application Configuration File is? And when/where/how to use it? Any documents on that? MSDN has somrthings scatter everywhere - hard to follow. thanks,
3
4283
by: Richard | last post by:
I have a simple C# console app that needs to read the appname.exe.config file to get db connect strings etc. from the <appSettings>. When the app starts, it deletes the file! I can't figure it...
5
4002
by: Olaf Gschweng | last post by:
We're new into DB2 and have some problem with DB2 8.1 (?) on a Linux system. We load some big tables of a DB2 database from files every day. We do a "DELETE FROM table" for each table and then we...
4
5372
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
3
375
by: Sean | last post by:
HI There, I am having trouble deploying my .aspx pages to a remote server, I have made changes to the config file and it still returns an error. I have also contacted the server administrator to...
5
1976
by: Homer J. Simpson | last post by:
Hi, Any idea to get the -REAL- number of active users -WITHOUT- this kind of code ? ---------------------------------------------------------------------------- --------- Sub Session_OnStart...
6
1434
by: yaron | last post by:
Hi all, I want to give a sample console application for the user with 2 configuration files. I want to give also a 2 .bat files for running the sample application, one for each configuration...
2
2523
by: Josh Kandiko | last post by:
Hi, I've been having some frustrations with deleting files from the Isolated Storage directories. Basically, I want my application to remove all instances of configuration information for my...
4
1738
by: =?Utf-8?B?SmFzb24gUmljaG1laWVy?= | last post by:
Is there a way to catch an application configuration error on startup? I have written a windows service. If there is an error in the configuration file (such as invalid xml) the exception is...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.