나는 주어진 디렉토리에 복사 MSI 파일의 그룹을 설치하는 서비스 다음 코드 조각이 : 대신의 사용 대화 상자를 표시 끝에 msiexec이 호출 할 때마다실패
private void InvokeInstallersIn(string path)
{
var di = new DirectoryInfo(path);
foreach (FileInfo fileInfo in di.GetFiles("*.msi"))
{
try
{
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = @"msiexec.exe"; // Specify exe name.
start.UseShellExecute = true;
start.RedirectStandardOutput = false;
start.WorkingDirectory = path;
var arguments = @"/I /l*v install.log /qn " +
fileInfo.Name + " REINSTALL=All REINSTALLMODE=amus";
start.Arguments = arguments;
Logger.Info("Process: msiexec.exe {0}", arguments);
Process process = Process.Start(start);
process.WaitForExit(30000);
}
catch (System.Exception e)
{
Logger.ErrorEx(e, "Error installing '{0}'", fileInfo.Name);
}
}
}
을 설치를 수행합니다.
업데이트
내가 Windows 탐색기를 통해 MSI를 설치하지만, 수 없습니다 명령 줄에서 모두 할 수 있습니다. 또한 msi 파일의 파일 권한을 변경할 수 없으며 설치 관리자가 Explorer를 통해 호출 할 때 "이 파일에 유효한 디지털 서명이 없습니다 ..."경고를 표시합니다. (나는이 파일을 내 컴퓨터의 공유에 복사하고 \ localhost \ MyShare를 통해 탐색기에서 액세스하고있다). 아마도 질문은 지금 입니다.이 경고를 명령 줄에서 무시하는 방법은 무엇입니까?
어디서 잘못 될지에 대한 단서가 있습니까?