Technically you still can do FindWindow. The MSI still does the same nasty stuff by executing every custom action in a separate external process.
Though you can also use the UIShell member of the managed setup even argument to access the handle:
If you need to pass it to a generic (not-event) managed custom action then you will need to save the handle to
Though the latest HotFix release v1.0.34.3 has delivered the change that assists you directly with the task:
Though you can also use the UIShell member of the managed setup even argument to access the handle:
project.UILoaded += UILoaded; ... staticvoid UILoaded(SetupEventArgs e) { MessageBox.Show((e.ManagedUIShell as Form).Handle.ToString()); }
e.Session["UI_HANDLE"]
and then read it in the custom action body.Though the latest HotFix release v1.0.34.3 has delivered the change that assists you directly with the task:
- Release notes: Added SetupEventArgs.ManagedUIHandle and WIXSHARP_MANAGED_UI_HANDLE session property