无声安装appserv-win32-2.5.10

时间:2014-05-13 22:15:04

标签: c# process installation silent appserver

我需要从基本的c#桌面应用程序安装'appserv-win32-2.5.10.exe' 通过预定义的参数值,如服务器,root密码等。 我发现这个代码用于通过将我的预定义参数发送到安装过程来从c#进行无提示安装。问题是如何获取此应用程序的参数名称''appserv-win32-2.5.10.exe''

int exitcode;
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = true;
startInfo.FileName = @"server\appserv-win32-2.5.10.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden; 
/// startInfo.Arguments = "/s /v/qn"; // Arguments 
using (Process exeProcess = Process.Start(startInfo))
        {
            exeProcess.WaitForExit();
            exitcode = exeProcess.ExitCode;
            MessageBox.Show("exitcode:" + exitcode);
        }

0 个答案:

没有答案
相关问题