System.IO.File.WriteAllBytes("файл который будет заменен.ехе", ИмяПроекта.Properties.Resources.ИмяФайлаВРесурсах);