473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delete application r/w data on uninstall

When un-installing an application...

Is it normal practice to write a special program that erases all the
files and folders for all the users of an application that reads and
writes to SpecialFolder.ApplicationData (C:\Documents and
Settings\Username\Application Data) ?

Or, is there some way to get the ms installer to do this for you?

Is there some way to use Application.UserAppDataPath to ease finding
all the folders that might need to be erased?

Thanks...
May 25 '07 #1
4 2199
Hello - HAL9000,

Hadn't the standard installers do it for u?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

-When un-installing an application...
->
-Is it normal practice to write a special program that erases all the
-files and folders for all the users of an application that reads and
-writes to SpecialFolder.ApplicationData (C:\Documents and
-Settings\Username\Application Data) ?
->
-Or, is there some way to get the ms installer to do this for you?
->
-Is there some way to use Application.UserAppDataPath to ease finding
-all the folders that might need to be erased?
->
-Thanks...
->
May 25 '07 #2
Installing is not the problem. The problem is uninstalling.

If one writes a file to the SpecialFolder.ApplicationData folder (a
folder created by the installer) then the uninstaller will not delete
the installer created folder. That is, if the folder is empty then
the folder will be deleted by the uninstaller. If the folder is not
empty then the folder will *not* be deleted by the installer.

Of course the file contains needed per user persistent data.

Further, because of multiple users, an application has no way of
easily iterating through all users of a machine to delete the above
mentioned (application) files.

Best I can tell, one has to deduce the SpecialFolder.ApplicationData
paths of all the users that might have used the (installed)
application.

For example, one has to go through and delete all files in these
paths.

C:\Documents and Settings\UserJohn\Application Data\MyAppName\*.*
C:\Documents and Settings\UserFred\Application Data\MyAppName\*.*
C:\Documents and Settings\UserMary\Application Data\MyAppName\*.*

at uninstall - by a special program.
On Fri, 25 May 2007 19:47:54 +0000 (UTC), Michael Nemtsev
<ne*****@msn.comwrote:
>Hello - HAL9000,

Hadn't the standard installers do it for u?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

-When un-installing an application...
->
-Is it normal practice to write a special program that erases all the
-files and folders for all the users of an application that reads and
-writes to SpecialFolder.ApplicationData (C:\Documents and
-Settings\Username\Application Data) ?
->
-Or, is there some way to get the ms installer to do this for you?
->
-Is there some way to use Application.UserAppDataPath to ease finding
-all the folders that might need to be erased?
->
-Thanks...
->

May 25 '07 #3
Hello - HAL9000,

So, you need the Custom action into your installer, which remove all custom
files, so the installer could remove the folder

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

-Installing is not the problem. The problem is uninstalling.
->
-If one writes a file to the SpecialFolder.ApplicationData folder (a
-folder created by the installer) then the uninstaller will not delete
-the installer created folder. That is, if the folder is empty then
-the folder will be deleted by the uninstaller. If the folder is not
-empty then the folder will *not* be deleted by the installer.
->
-Of course the file contains needed per user persistent data.
->
-Further, because of multiple users, an application has no way of
-easily iterating through all users of a machine to delete the above
-mentioned (application) files.
->
-Best I can tell, one has to deduce the SpecialFolder.ApplicationData
-paths of all the users that might have used the (installed)
-application.
->
-For example, one has to go through and delete all files in these
-paths.
->
-C:\Documents and Settings\UserJohn\Application Data\MyAppName\*.*
-C:\Documents and Settings\UserFred\Application Data\MyAppName\*.*
-C:\Documents and Settings\UserMary\Application Data\MyAppName\*.*
->
-at uninstall - by a special program.
->
-On Fri, 25 May 2007 19:47:54 +0000 (UTC), Michael Nemtsev
-<ne*****@msn.comwrote:
->
>Hello - HAL9000,

Hadn't the standard installers do it for u?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

-When un-installing an application...
->
-Is it normal practice to write a special program that erases all
the
-files and folders for all the users of an application that reads
and
-writes to SpecialFolder.ApplicationData (C:\Documents and
-Settings\Username\Application Data) ?
->
-Or, is there some way to get the ms installer to do this for you?
->
-Is there some way to use Application.UserAppDataPath to ease
finding
-all the folders that might need to be erased?
->
-Thanks...
->

May 25 '07 #4
Thanks for your help.

Right, I'm going down that path now - custom uninstall action. I was
hoping there was an easier way which is why I asked.

It just seems as though the installer creating folders for me is
useless if I always have to manually delete them (at least the files
in the folders) on uninstall.
On Fri, 25 May 2007 20:31:48 +0000 (UTC), Michael Nemtsev
<ne*****@msn.comwrote:
>Hello - HAL9000,

So, you need the Custom action into your installer, which remove all custom
files, so the installer could remove the folder

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

-Installing is not the problem. The problem is uninstalling.
->
-If one writes a file to the SpecialFolder.ApplicationData folder (a
-folder created by the installer) then the uninstaller will not delete
-the installer created folder. That is, if the folder is empty then
-the folder will be deleted by the uninstaller. If the folder is not
-empty then the folder will *not* be deleted by the installer.
->
-Of course the file contains needed per user persistent data.
->
-Further, because of multiple users, an application has no way of
-easily iterating through all users of a machine to delete the above
-mentioned (application) files.
->
-Best I can tell, one has to deduce the SpecialFolder.ApplicationData
-paths of all the users that might have used the (installed)
-application.
->
-For example, one has to go through and delete all files in these
-paths.
->
-C:\Documents and Settings\UserJohn\Application Data\MyAppName\*.*
-C:\Documents and Settings\UserFred\Application Data\MyAppName\*.*
-C:\Documents and Settings\UserMary\Application Data\MyAppName\*.*
->
-at uninstall - by a special program.
->
-On Fri, 25 May 2007 19:47:54 +0000 (UTC), Michael Nemtsev
-<ne*****@msn.comwrote:
->
>>Hello - HAL9000,

Hadn't the standard installers do it for u?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

-When un-installing an application...
->
-Is it normal practice to write a special program that erases all
the
-files and folders for all the users of an application that reads
and
-writes to SpecialFolder.ApplicationData (C:\Documents and
-Settings\Username\Application Data) ?
->
-Or, is there some way to get the ms installer to do this for you?
->
-Is there some way to use Application.UserAppDataPath to ease
finding
-all the folders that might need to be erased?
->
-Thanks...
->

May 26 '07 #5

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

Similar topics

2
29856
by: Tim Failes | last post by:
Our application needs to write some application specific data, but I have not been able to find the recommended method to obtain the correct pathname. I have found many references to the...
2
5130
by: Trevor Davies | last post by:
I have a database which I have loaded onto our as/400 v4r5. All the tables and data have loaded successfully. I am using DB2 connect to access. I now want to delete the data in a table which is...
1
2363
by: Charles | last post by:
Hi MS Access & MS SQL Server Gurus ! I am trying to delete duplicate data from a LINKED SQL Server 2000 table (LinkedTable) and insert the result into a local (in Access) table. The following...
2
1431
by: amrhi | last post by:
Please help me, I try to get global variables but failed. I cant delete my data my code \">Delete</a>] in delete.php i wrote <?php
3
1094
by: mista852003 | last post by:
Help?!!! How to delete the row in datagrid without delete from data source?
0
4077
by: hunkgym | last post by:
Good day! Currently I am using MS SQL Server 2000. I wish to delete all data in the database table except data in login table and security table. Furthermore, TRUNCATE is done on stand-alone...
7
1666
by: Bruce | last post by:
In a site that has about 4000 products, in 1000 categories, I thought that I can store each product and category details in its own application("var"), instead of trips to the database. When...
4
5187
by: Bob | last post by:
Hi, How do you get the application folder path that a user select in a msi install which defaults to c:\Program Files\Company Name\...? Thanks, Bob
1
2029
by: fishjelly | last post by:
How to edit and delete the data stored in xml file using C# and visual studio 2005 through user input? For example: for this xml document... <MenuRoot> <Books> <book> <title> ABC </title>...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7398
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...
0
7502
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
5637
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
5057
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
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
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.