[英]Running an embedded exe with its dependencies c#
Embedded the following content in my windows application and executed the setup.exe using the code below: 在Windows应用程序中嵌入以下内容,并使用以下代码执行setup.exe:
string path = Path.Combine(Path.GetTempPath(), "setup.exe");
File.WriteAllBytes(path, EmbeddedApp2.Properties.Resources.setup);
Process.Start(path);
When I run the application the installation shield flashes and disappear. 当我运行该应用程序时,安装护罩闪烁并消失。
Can you try? 你能试一下吗?
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();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.