Thanks guys, but this still doesn't solve my problem. Gregor, I understand that Mac users would delete the folder and nothing could be run then, but at least I need a workaround to run some code at the install time, or first time the application runs after install, is there a way to do at least that? Then I could check for any old files and delete them, reset prefs, etc.
As user Dan commented in the Oli's blog, I also got the same idea of checking the file dates and times in applicationDirectory, if that time is less than 1 minute from "now", then it is a fresh install and I need to clean up what is in the applicationStorageDirectory. If that date is older, that means I'm just running the same already installed application again, and I leave everything as is. But as Dan posted, this seems like a very very ugly hack. a. On Mon, Dec 8, 2008 at 1:33 PM, Gregor Kiddie <[EMAIL PROTECTED]> wrote: > Take a look at Oli Goldman's article on why the AIR app installer > doesn't clean up after itself. > > > > > http://blogs.adobe.com/simplicity/2008/07/why_uninstallers_dont_clean_up_user_files.html > > > > Gk. > > *Gregor Kiddie* > Senior Developer > *INPS* > > Tel: 01382 564343 > > Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ > > Registered Number: 1788577 > > Registered in the UK > > Visit our Internet Web site at www.inps.co.uk > > The information in this internet email is confidential and is intended > solely for the addressee. Access, copying or re-use of information in it by > anyone else is not authorised. Any views or opinions presented are solely > those of the author and do not necessarily represent those of INPS or any of > its affiliates. If you are not the intended recipient please contact > [EMAIL PROTECTED] > ------------------------------ > > *From:* [email protected] [mailto:[EMAIL PROTECTED] *On > Behalf Of *Alen Balja > *Sent:* 08 December 2008 03:34 > *To:* [email protected] > *Subject:* Re: [flexcoders] AIR app uninstall issue - database stays in > applicationStorageDirectory forever? > > > > I would really appreciate if someone maybe close to Adobe would shed some > light on the issue. Can it be done, are there some workarounds. It's really > annoying, we're few days from release and client just found this "bug". The > bug is that ApplicationStorageDirectory doesn't get deleted on uninstall. > Hence, all the user's settings remain after he uninstalls the app and > installs it again. (Plus it's very ugly to have all the files there forever) > > > Not sure if I'm doing something wrong, on the application launch I'm > copying SQLite database from applicationDirectory to > applicationStorageDirectory, in order to be able to read and write. > > Of course, I check if the database already exists there or not. > > var dbFile:File = File.applicationDirectory. > > resolvePath("database.db"); > > var DBDestination:File = > File.applicationStorageDirectory.resolvePath("db/database.db"); > > > if (!DBDestination.exists) > { > dbFile.copyTo(DBDestination); > } > > Everything is fine here, up to the point when application is > uninstalled. Database stays there even after the uninstall and hence > breaks some critical functionality. > > It might be that I'm not following some best practices, or there is a > way to manually clean up the stuff, I don't know. Any ideas? > > Alen > > > > > > > > > > > > On Fri, Dec 5, 2008 at 7:24 PM, b_alen <[EMAIL PROTECTED]> wrote: > > Not sure if I'm doing something wrong, on the application launch I'm > copying SQLite database from applicationDirectory to > applicationStorageDirectory, in order to be able to read and write. > > Of course, I check if the database already exists there or not. > > var dbFile:File = File.applicationDirectory.resolvePath("database.db"); > > var DBDestination:File = > File.applicationStorageDirectory.resolvePath("db/database.db"); > > > if (!DBDestination.exists) > { > dbFile.copyTo(DBDestination); > } > > Everything is fine here, up to the point when application is > uninstalled. Database stays there even after the uninstall and hence > breaks some critical functionality. > > It might be that I'm not following some best practices, or there is a > way to manually clean up the stuff, I don't know. Any ideas? > > Alen > > > > >

