This one evaded me at first and is very simple. Experienced Eclipse users are already familiar with its’ small intricacies, but for a Microsoft Visual Studio Developer who is not on Eclipse often, it is easy to forget your way weaving through the maze of perspectives, windows and views.
I’ve used Eclipse quite a bit in the past with PHP, so my first thought was to simply “refactor”/”move”. However, this would not solve my problem.
As an alternative to using the “Rollback” or “InstallException” approach, simply use pinvoke/interop to call the cancel button on the base installer form directly.
(see my related post for more detail and full code)
ShowWindow(msiwindowhandle, ShowWindowCommands.Show); IntPtr cancelbuttonhandle; const int BM_CLICK = 0x00F5; msiwindowhandle = FindWindow("#32770", InstallTitle); cancelbuttonhandle = FindWindowEx(msiwindowhandle, IntPtr.Zero, "Button", "Cancel"); SetActiveWindow(msiwindowhandle); //necessary for button click to fire SendMessage(cancelbuttonhandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);