views:

507

answers:

1

I'm creating a cab installer for a today screen plugin for windows mobile. When the user activates the today screen plugin it is loaded by the shell. When the user now uninstalls the plugin, a message appears that the device should be reset.

How do I correctly uninstall the today screen plugin from the device? Maybe waiting for an "unload" of the dll once the registry keys for the today screen plugin are removed? A custom setup.dll?

+2  A: 

Microsoft don't provide a API to disable or enable today screen plugins.

I would recommend that you create setup dll that on uninstall check's to see if your today screen plugin is enabled. If it is, tell the user to disable your today screen plugin and re-run the uninstall and then fail the uninstall.

Any other method would either require a reset of the device or hacking WM to figure out how to programmatically disable and unload your today screen plugin dll (not easy and maybe not portable between WM versions).

Shane Powell
Thanks! From searching I got some approaches to reload the today screen that may work.1. SendingSendMessage(::GetDesktopWindow(), WM_WININICHANGE, 0xF2, 0);2. PostingPostMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);which may do the same.
vividos