Hi George.
> Vista (?) seems to be caching the original files somewhere, pulling them out of the ashes and restoring THEM again, rather than my populated tables.
I assume you're storing the data tables in a subdirectory of the program directory, which is a subdirectory of Program Files. Under Vista, you can no longer do that, as Program Files is considered to be a protected resource. Normally, this would cause your application to get a "file access denied" error when you try to write to the tables, but through a process called virtualization, Vista redirects writes (and later reads) to another folder. For example, it redirects writes to a file in C:\Program Files\Some Folder to C:\Users\username\AppData\Local\VirtualStore\Program Files\Some Folder, where username is the name of the logged-in user. For more information on virtualization, see
http://msdn2.microsoft.com/en-us/library/aa905330.aspx.
When the user adds records to your tables, they're actually updating the virtualized copies, not the ones in your app directory. When they uninstall the application, those virtualized tables aren't removed. When they reinstall, Vista finds the virtualized tables and uses them. So, the user sees old data.
The solution is to change your application to not store its tables in Program Files, but instead in another folder the user can write to. You shouldn't hard-code the path because it may be different on Windows XP and Vista. You can use the code I published on my blog (
http://doughennig.blogspot.com/2007/01/finding-paths-for-special-folders.html) to obtain the folder for a specific location.
> The user has administrator status.
You think they do, but they don't really. The MSDN article I mentioned above discusses the concept of a split token, in which when an administrator logs in, they actually use a standard user token for desktop application. This means they don't have administrative rights unless they elevate when prompted, so they don't have the permissions necessary to perform certain tasks, such as writing to protected resources.
Vista changes the way developers do things, but only because we didn't follow the rules before (we assumed everyone had admin rights to their systems). I highly recommend reading the MSDN article and test your app on a Vista system.
Doug