I have an outlook add-in which runs only on the first startup of Outlook, at which point it creates a toolbox and adds it to Outlook's command bar. I used this approach rather than creating a temporary UI on each startup because I want the user's decisions about the control to be persistent; if the user disables the control or moves it, it should stay moved.
However, when uninstalling the application, the UI stays behind, even though the dll is unregistered and deleted. CUrrently, the only idea I have for fixing this issue is for the add-in dll (or a separate dll) to, after uninstall, remain behind, be triggered one more in uninstall mode, and remove the toolbar the next time Outlook starts up.
There are a few issues with this approach:
- I am not sure, short of unregistering and registering the dll, how to force the dll I made to run again the next time outlook starts.
- I am not sure if my thoughts on an approach are even a good idea.
- This whole thing strikes me as hacky.
What would be the best way to remove such a UI after an uninstall?