How can I crash my Outlook VSTO 2005 SE Outlook so that it is disabled?

For testing purposes, I need to disable my Outlook 2003 addin (vb.net) so that it can only be activated via the help menu or by removing the resilency key from the registry.

I tried to achieve this by throwing an unhandled invalid casting exception during the start event handler, but that doesn't help. Outlook only says that it couldn't download the add-on, but it doesn't disable it.

How can I create a crash that disables the add?

+1


source to share


2 answers


I found an easy way:

  • Set a breakpoint in the addin startup event handler.
  • Run the add from visual studio in debug mode.
  • When you hit the breakpoint, open Task Manager.
  • Kill Outlook process.
  • Launch Outlook normaly (not from Visual Studio).


-> Outlook will now ask you if you want to disable the add or not.

+2


source


Another operation can be a call during startup, for example

System.Threading.Thread.Sleep(10000)



during this kill request from the task manager.

The next time you start Outlook, it will ask you if you want to disable the add.

0


source







All Articles