executing in a different directory

System::Diagnostics::Process::Start("lag.exe");

I love this command, but how do I use it for something in another directory

let's say the .cpp is in
c:\lag

but the file I want is in
c:\lag2
you can use spawn and exec functions to run the command and it will help you keep track of it...

other than that, you can just add directories "C:\somedir\lag.exe" or "..\lag.exe"
I tried adding the directory. Nothing happened. I didn't get an error, but nothing happened.
you didn't put like I did, did you?... don't forget about the '\' they have to be "\\"
Use the following overload of Process.Start:

http://msdn.microsoft.com/en-us/library/0w4h05yb%28v=vs.80%29.aspx

And set the property working directory of the instance of the ProcessStartInfo class:

http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.workingdirectory.aspx
Topic archived. No new replies allowed.