在我的Windows应用程序中嵌入以下内容,并使用以下代码执行setup.exe:
string path = Path.Combine(Path.GetTempPath(), "setup.exe");
File.WriteAllBytes(path, EmbeddedApp2.Properties.Resources.setup);
Process.Start(path);
当我运行应用程序时,安装防护罩会闪烁并消失。
答案 0 :(得分:0)
Process myProcess = new Process();
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.ErrorDialog = false;
myProcess.StartInfo.RedirectStandardOutput = false;
myProcess.StartInfo.RedirectStandardInput = false;
myProcess.StartInfo.RedirectStandardError = false;
myProcess.EnableRaisingEvents = true;
myProcess.StartInfo.FileName = "setup.exe";
myProcess.Start();