private void WorkerThread_DoWork(object sender, DoWorkEventArgs e) { //create a new msi class and do the work! CwMsiClass msi = new CwMsiClass(); try { msi.Start(workerThread, pbar.Step, e); } catch (Exception ex) { MessageBox.Show(ex.Message); } }