System.Diagnostics.Process p = new Process();
                ProcessStartInfo si = new ProcessStartInfo();
                si.FileName = fileName;
                // si.Arguments = "-s " + hs.HostService.ID;
                //si.WorkingDirectory = Path.GetDirectoryName(fileName);
                si.WindowStyle = ProcessWindowStyle.Normal;
                si.UseShellExecute = true;//为true,则用默认的打开方式打开,如果是exe等,设置为false

                p.StartInfo = si;
                p.Start(); 

上面的是自己程序中使用过的
详细的介绍,可以参考:

在C#中调用其它程序
posted on 2007-12-14 16:52  颜昌钢  阅读(935)  评论(0编辑  收藏  举报