I'm building a custom install program that allows the user
to select which assemblies get installed. In creating the
prototype I am encountering a situation where the main
form will not accept user input after the installation is
complete.

In my form, pressing the 'Install' button runs the
following method:

public override bool Install()
{
IDictionary savedState = new Hashtable();

System.Configuration.Install.AssemblyInstaller ai = new
System.Configuration.Install.AssemblyInstaller();

try
{
ai.Path = "testassembly.dll";
ai.UseNewContext = true;
ai.Install(savedState);
ai.Commit(savedState);

ai.Dispose();
return true;
}
catch (Exception e)
{
return false;
}
}


My trivial installer class is the only class in
the "testassembly.dll" named above:

[RunInstaller(true)]
public class Installer1 :
System.Configuration.Install.Installer
{
public Installer1()
{
}

public override void Install(IDictionary stateSaver)
{
base.Install (stateSaver);
MessageBox.Show("Installing", "TestAssembly");
}

public override void Uninstall(IDictionary savedState)
{
base.Uninstall (savedState);
MessageBox.Show("Installing", "TestAssembly");
}
}

After the install MessageBox is dismissed, the main form
gets updated (progress bar goes away and a 'Done' button
is made visible) correctly, but when I try to either click
the 'Done' button to exit the app, or close the form,
nothing happens.

If I remove the MessageBox from the installer class, then
everything works correctly and I can exit the app, so I
assume that there is some sort of forms or event loop
issue going on, but I have not been able to figure it out.
Anyone have any ideas?


Matt