2013-11-26 51 views
0

我们可以隐藏窗口填充由于下面的代码,隐藏“准备安装”窗口编程

IntPtr updatedHandle = new IntPtr(); 
UInt32 openVal = MsiInteract.MsiOpenPackage("C:\\MSIGet.MSI", out updatedHandle); //get handle for the MSI 

我有读.MSI文件的一些信息,我上面的代码中使用一个C#应用程序。这对我很好,但一个窗口得到填充MsiOpenPackage函数调用。因为这个函数是在循环中,所以它是为我当多个窗口打开时fustrated.Please我提供任何方法来隐藏“准备安装”窗口功能请致电MsiOpenPackage

回答

0

使用安静的安装程序您可以避免为用户确认或对话框打开任何窗口。

string installer = _installer; 
       System.Diagnostics.Process FProcess = new System.Diagnostics.Process(); 
       FProcess.StartInfo.FileName = "MsiExec.exe"; 
       FProcess.StartInfo.Arguments = "/quiet /i " + installer; 
       FProcess.StartInfo.UseShellExecute = false; 
       FProcess.Start(); 
       FProcess.WaitForExit(); 
+0

感谢您的回答,但亲爱的我不想执行MSIGet.MSI文件。我只想读取MSIGet.MSI文件以获取版本和ETC信息。 –