private void LoadInstallInfoZip() { try { //Look for .installinfo file string path = System.IO.Path.GetFullPath(String.Format("{0}.installinfo", System.Diagnostics.Process.GetCurrentProcess().ProcessName)); if (!File.Exists(path)) { MessageBox.Show(String.Format("The file \"{0}\" could not be found!\nThis file should be in the same directory as the executable.\n\nThe installer will now close.", System.IO.Path.GetFileName(path)), "Initialization", MessageBoxButton.OK, MessageBoxImage.Error); Environment.Exit(0); } //Load .installinfo zipManager = new ZipReader(ZipFile.Open(path, ZipArchiveMode.Read)); //Load installerXml from .installinfo if (!zipManager.Exists(GeneralInfo.InstallerXml)) { MessageBox.Show(string.Format("Could not find \"{0}\" in \"{1}\". This file must be at the root level in the archive.\n\nThe installer will now close.", GeneralInfo.InstallerXml, System.IO.Path.GetFileName(path)), "Initialization", MessageBoxButton.OK, MessageBoxImage.Error); Environment.Exit(0); } InstallerInfo = zipManager.DeserializeXmlFromArchive <InstallerXml>(GeneralInfo.InstallerXml); InstallerInfo.Init(); GeneralInfo.InstallerXmlInfo = InstallerInfo; } catch (Exception ex) { MessageBox.Show(ex.Message, "InstallInfo open failed.", MessageBoxButton.OK, MessageBoxImage.Error); Environment.Exit(0); } }