public void Kill() { var fi = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location); fi = new FileInfo(Path.Combine(fi.DirectoryName, "installsettings.xml")); if (fi.Exists) fi.Delete(); System.Threading.Thread.Sleep(500); }