我知道这可能乍一看看起来像你之前看到过的一个问题: 知道外部进程的窗口何时显示
但这有点不同.
我有一个C#asp.net Web应用程序,用于帮助人们为他们的程序创建安装程序.(这里的开发人员大多是机械工程师在一些计算工具中编写脚本方程式,他们不是软件人员,所以我们不希望他们花时间学习wix,调试安装程序,维护版本之间的GUID等等.)
服务器端将运行控制台应用程序"heat.exe"(wix工具附带的工具),以获取有关如何注册dll等的信息,当且仅当他们的存储库中有dll时...
我是这样做的:
public int runHeat(string filePath, string outputFile, ref string response)
{
response += "run heat.exe to harvest file data" + '\r' + '\n';
string args = "file " + '"' + filePath + '"' + " -srd -out" + '"' + outputFile + '"';
string command = Path.Combine(WixBinariesPath, "heat.exe");
string workPath = Path.GetDirectoryName(filePath);
StringBuilder outputBuilder;
ProcessStartInfo processStartInfo;
Process process;
outputBuilder = new StringBuilder();
processStartInfo = new ProcessStartInfo();
processStartInfo.CreateNoWindow = true;
processStartInfo.RedirectStandardOutput …Run Code Online (Sandbox Code Playgroud) 我正在 Win 7-64 位机器上工作。我有一个软件安装包,其中包含.msi文件、CAB文件和一些MST文件。我想修改内阁文件。所以我使用CABARC实用程序提取 cab 文件。
但在对提取的文件进行任何更改之前,为了测试该实用程序,我从当前目录中删除了原始 cab 文件。并再次使用 CABARC 实用程序从原始 cab 文件中提取的文件创建了一个新的 cab 文件。
但现在如果我运行 .msi 文件,它会显示错误:
错误:1334。无法安装文件“XYZ”,因为在压缩文件 Data1.cab 中找不到该文件。这可能表示网络错误、从 CD-ROM 读取错误或此软件包有问题。
但该文件存在于内阁文件中,我可以看到。相同的安装程序可以很好地处理原始 cab 文件。
我也尝试过不同的压缩类型(MSZIP、LZX:<15...21>),但它们都不起作用。我没有删除/添加内阁文件中的任何文件。我是否做错了什么,或者内阁文件是否存储了任何其他信息?
谢谢。
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int P[9],temp=0,g; //temp for highest pancakes, g for person number
for(int i=0;i<10;i++)
{
cout<<"Enter the number of pancakes eaten by person "<<i+1<<" ";
cin>>P[i];
if(P[i]>temp)
{
temp=P[i];
g=i+1;
}
}
cout<<"Most pancakes were ate by person "<<g<<endl<<temp;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
问题是如果我为最后一个人输入的值小于10,则循环再次开始.如果我输入P [9] <10,则循环再次运行.就像我输入0煎饼一样,下一个输出线是 - 输入人2吃的煎饼数量
但是,如果我输入一个大于10的值,那么循环似乎工作正常.问题出在这里?