日期:2014-05-17  浏览次数:20894 次

asp.net 访问 exe文件的方法
调用Process类,strFileName是被调用exe文件的路径
public void CallSteven(string strFileName)
        {
            System.Diagnostics.Process prc = new System.Diagnostics.Process();
            try
            {
                prc.StartInfo.FileName = strFileName;
                prc.Start();
            }
            catch (Exception exU)
            {
                if (!prc.HasExited)
                {
                    prc.Close();
                }

                throw new Exception(exU.Message.ToString());
            }
        }

?