Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation isntall VS setu项目msi中的多个exe?_Installation_Windows Installer - Fatal编程技术网

Installation isntall VS setu项目msi中的多个exe?

Installation isntall VS setu项目msi中的多个exe?,installation,windows-installer,Installation,Windows Installer,我正在尝试在msi项目中添加run exe安装程序。 我试图做的是在项目中作为自定义操作运行这部分代码 ProcessStartInfo psi = new ProcessStartInfo(); psi.Arguments = arguments; psi.FileName = Path.Combine(BIPath, EXECUTABLE_NAME); psi.CreateNoWindow = true; psi.WindowStyle = ProcessWindowStyle.Hidden

我正在尝试在msi项目中添加run exe安装程序。 我试图做的是在项目中作为自定义操作运行这部分代码

ProcessStartInfo psi = new ProcessStartInfo();
psi.Arguments = arguments;
psi.FileName = Path.Combine(BIPath, EXECUTABLE_NAME);
psi.CreateNoWindow = true;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.RedirectStandardError = true;
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
using (Process proc = Process.Start(psi))
{
myInstallContext.LogMessage("before WaitForExit TIME = "+DateTime.Now.ToString());
proc.WaitForExit();
myInstallContext.LogMessage("after WaitForExit TIME = "+DateTime.Now.ToString());
}

但这部分代码从未完成?在Vistual studio setup projectmsi中是否有其他方法可以做到这一点?

您不会说是否看到这些日志消息,因此我不确定“永不完成”是什么意思,但如果该代码处于自定义操作中,并且正在调用另一个setup.exe来启动基于MSI的安装程序,那么它将无法工作,因为你不能安装递归MSI。我的意思是永远不要停止,我在WaitForExit TIME=+DateTime.Now.ToString之前在日志中收到了这条消息,之后它似乎卡住了,我没有想到递归MSI。我正在运行msi内部的自定义操作中运行setup.exe。这里的递归步骤是什么?VS MSI安装无法通过自定义操作调用另一个MSI安装,这就是问题所在。我怀疑您收到了错误1618,安装程序正在静默挂起。它是静默的,因为VS自定义操作使用系统帐户运行,因此不会显示在交互用户的桌面上。VS安装程序中没有很多功能可以将多个msi捆绑到一个安装程序中。如何访问系统上的本地exe并在msi中运行它?这也是不能接受的?