Starting application from the script

Ask general questions here.
Fizaliss
Posts: 3
Joined: Tue May 19, 2009 1:28 pm

Starting application from the script

Post by Fizaliss » Tue May 19, 2009 2:09 pm

Hello, I was trying to start my application from the script with System.Diagnostics.Process.Start("c:\\myprogram\\myprogram.exe");

But this program has to be started with the working directory set to "c:\\myprogram\\", how can I do that?

Fizaliss
Posts: 3
Joined: Tue May 19, 2009 1:28 pm

Post by Fizaliss » Tue May 19, 2009 3:12 pm

Already got help on that one :)

System.Diagnostics.ProcessStartInfo ProcInfo = new System.Diagnostics.ProcessStartInfo("application");
ProcInfo.WorkingDirectory = "working directory";

System.Diagnostics.Process.Start(ProcInfo);