Removing Data from the Appdata\Roaming folder
Answers (4)
If using an MSI route...
create the appropriate remove file tables, (yes this will only remove files for the person uninstalling), you could add the script as a customaction, to do recursive check.
But do you need to??
If the app is uninstalled, the files in the user profile will remain, being 'orphaned', that's not such a big problem.
If there is a newer version of the app, and it doesn't get on well with the older version of the files, create the newer MSI to do a nice self repair to put down 'correct files' for the newer app.
OR, you could create a component to remove the old files, HKCU key path, when the repair happens it will remove the older files from the users profile. When the app launches, it should then create the files it needs.
Hopefully that will work and you wont have to set the correct orders for it to delete files, then copy new files.
good luck
In my opinion you could use some script in ActiveSetup which will delete files from %APPDATA% at first logon. - rad33k 10 years ago