退出代码1625是“系统策略禁止此安装。请与您的系统管理员联系。”
我这样叫它:
Process installProcess = Process.Start(msiPath, "/quiet");如果我手动打开它,我可以很好地运行msi。这是在windows server 2008上...
这样做的目的是用最新版本自动更新我的.net forms程序。有没有人知道是什么环境造成的?我的意思是,客户端将使用vista/7/xp,但我仍然需要知道什么样的安全设置会破坏我的计划。
发布于 2011-01-09 14:28:42
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.Arguments = "/i " + "\""+Directory.GetCurrentDirectory()+"\\"+msiPath +"\"" +" /q";
startInfo.FileName = "msiexec.exe";
startInfo.Verb = "runas";
Process installProcess = Process.Start(startInfo);以这种方式调用msi起到了作用。
我想是UAC的问题吧。runas动词以某种方式提升了程序拥有的权限。即使我的UAC提示在服务器2008上被禁用了,我仍然不得不这样做来绕过它。奇怪吧?
https://stackoverflow.com/questions/4630401
复制相似问题