Is it possible to make so that Windows Mobile would keep some files which were installed from a .cab file after unstallation?

StackOverflow https://stackoverflow.com/questions/7713757

Question

I'm making .cab file for deploying my application on mobile devices (Windows Mobile 6.5). I create it "manually" with cabwiz.exe, because Visual Studio 2008 has problems with CAB projects (they are described quite well, localization files is one issue).

Everything is fine except that Windows Mobile deletes all installed files when user uninstalls the application. I want to keep some file after uninstallation in case if another version of the application will be installed.

Now the only way to preserve files from deletion during uninstallation is to rename them. Is there any better do this?

Was it helpful?

Solution

The CAB installer will uninstall everything it knows that it installed. It will not delete files that were created at run-time. If you have something like a config file, simply rename it at app startup and use the renamed file in your app code. When the uninstaller removes the app, it won't know about the rename and will leave that file alone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top