How do I show "Finished installing" notification after silently installing apps with InPlaceHostingManager
I have used InPlaceHostingManager to install one or several apps silently on the client-side.
And now I want them to know when it finishes installing so they can start using it. I don't plan on using any progress bar or anything, just needed to install any number of installations as one batch (with one click).
I just need to notify the user when the installation process ends even if my own app that started the installation is closed before it finishes.
InPlaceHostingManager has this line:
iphm.DownloadApplicationCompleted += new EventHandler<DownloadApplicationCompletedEventArgs>(iphm_DownloadApplicationCompleted);
and shows a messagebox like so
`void iphm_DownloadApplicationCompleted(object sender, DownloadApplicationCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show("Could not download and install application. Error: " + e.Error.Message);
return;
}
// When Application is successfully installed on the client computer.
MessageBox.Show("Application installed! You may now run it from the Start menu.");
}`
should I run a service? or call something after my program closes. Someone told me just call the event after you close your program but I think I should do it on the installation side.
How should I do this?