문제

Exit code 1625 is "This installation is forbidden by system policy. Contact your system administrator."

What I'm doing is calling it this way:

Process installProcess = Process.Start(msiPath, "/quiet");

I can run the msi fine if I open it manually. This is on windows server 2008...

The intent of this is to automatically update my .net forms program with the latest version. Anybody have a clue what sort of setting is causing this? I mean, the clients are going to be using vista/7/xp, but I still need to know what kind of security settings will ruin my plan.

도움이 되었습니까?

해결책

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.Arguments = "/i " +  "\""+Directory.GetCurrentDirectory()+"\\"+msiPath +"\"" +" /q";
startInfo.FileName = "msiexec.exe";
startInfo.Verb = "runas";


Process installProcess = Process.Start(startInfo);

Calling the msi this way did the trick.

Turned out to be some kind of UAC issue I think. The runas verb somehow elevates the permissions the program has. Even though my UAC prompts were disabled on server 2008 I still had to do this to get around it.. strange huh?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top