/// <summary> /// Inits this instance. /// </summary> protected void Init() { this.hostWindow = GetMsiForegroundWindow(); this.Opacity = 0.0005; this.Text = Win32.GetWindowText(this.hostWindow); #if DEBUG //System.Diagnostics.Debugger.Launch(); #endif foreach (Process p in Process.GetProcessesByName("msiexec")) { try { this.Icon = Icon.ExtractAssociatedIcon(p.MainModule.FileName); //service process throws on accessing MainModule break; } catch { } } }
void WixDialog_Load(object sender, EventArgs e) { this.Text = Win32.GetWindowText(this.hostWindow); }