读书人

C#打开exe程序同一个文件夹里边的ex

发布时间: 2012-09-01 09:33:02 作者: rapoo

C#打开exe程序,同一个文件夹里面的exe程序
C#打开exe程序,同一个文件夹里面的exe程序,不是系统的exe,必须用绝对路径吗?请问有什么办法使用相对路径吗?

[解决办法]

C# code
 ProcessStartInfo startInfo = new ProcessStartInfo();                    startInfo.FileName = Application.StartupPath + @"\Updater.exe";                    startInfo.WindowStyle = ProcessWindowStyle.Normal;                    startInfo.Arguments = newVersion;//传参数给exe                    Process.Start(startInfo);
[解决办法]
C# code
 ProcessStartInfo startInfo = new ProcessStartInfo();                    startInfo.FileName = Application.StartupPath + @"\DMM.AddUpdater.exe";                    startInfo.WindowStyle = ProcessWindowStyle.Normal;                    startInfo.Arguments = newVersion;                    Process.Start(startInfo);
[解决办法]
C# code
 ProcessStartInfo startInfo = new ProcessStartInfo();                    startInfo.FileName = Application.StartupPath + @"\DMM.AddUpdater.exe";                    startInfo.WindowStyle = ProcessWindowStyle.Normal;                    startInfo.Arguments = newVersion;                    Process.Start(startInfo); 

读书人网 >C#

热点推荐