Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Window handle of UI window

$
0
0
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:
project.UILoaded += UILoaded;
...
staticvoid UILoaded(SetupEventArgs e)
{
    MessageBox.Show((e.ManagedUIShell as Form).Handle.ToString());
}
If you need to pass it to a generic (not-event) managed custom action then you will need to save the handle to 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

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>