Hi guys,
I have managed to bring another form on top of the setup and deployment wiz when it reaches onBeforeInstall. I want to call a rollback in the installer class, if my form is closed. How can i connect these two instances? I have tried the below method, but can't seem to solve it. Any ideas?
I have managed to bring another form on top of the setup and deployment wiz when it reaches onBeforeInstall. I want to call a rollback in the installer class, if my form is closed. How can i connect these two instances? I have tried the below method, but can't seem to solve it. Any ideas?
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);
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);