What's the best way for a .NET Compact Framework executable to uninstall it?
3 answers
Windows Mobile has a directory:
\ application data \ volatile
This directory is kept as long as the device is powered.
So what we do:
- copy the exe to that directory or subdirectory (I usually use the subdirectory to make sure we don't run into another application).
- run exe from that directory.
- delete the files you want.
- (optional) soft-reset.
For compatibility with all devices, you must use the SHGetSpecialFolderPath function with CSIDL_APPDATA to get the application data directory and add "\ volatile" to it.
+2
source to share
One idea is that you can use wceload:
http://msdn.microsoft.com/en-us/library/bb158700.aspx
Write a cockpit file with a custom pitch (I think you might need to create a setup.dll file) that will uninstall your application.
Get your application to call wceload when it exits to start this booth by passing an argument to load wce to remove the booth after it finishes.
I don't know as far as I know.
0
source to share