By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

Delete application r/w data on uninstall

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.