我有一个正在运行的服务,该服务将创建一个新线程来启动一个进程。
它启动的进程将调用一个 MSI,该 MSI 将实质上停止原始父服务(调用启动 msi 的进程的服务)
截至目前,该进程终止导致 MSI 在完成执行之前失败。
startInfo.FileName = "UpdateInstaller.exe";
startInfo.Arguments = "ParentServiceName.exe";
startInfo.UseShellExecute = true;
startInfo.RedirectStandardOutput = false; //Edited as per comment below. Still wont work
new Thread(() =>
{
Thread.CurrentThread.IsBackground = true;
Process.Start(startInfo);
}).Start();
关于如何运行这个过程但保持它活着的任何想法,即使在父母死后也是如此?