string parmes = ""; Process w = new Process(); //指定 调用程序的路径 w.StartInfo.FileName = Application.StartupPath + @"\xmlpkg.exe"; w.StartInfo.UseShellExecute = false; //不显示执行窗口 w.StartInfo.CreateNoWindow = true; if (radioButton1.Checked) //打包 { parmes = string.Format(" -p {0} {1}", textBox2.Text, textBox1.Text); } else if (radioButton2.Checked)//解压 { parmes = string.Format(" -u {0} {1}", textBox1.Text, textBox2.Text); } else { MessageBox.Show("请先选择 打包或是解压 操作"); return; } //指定 调用程序的参数 w.StartInfo.Arguments = parmes; w.Start();