المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Executing batch files in C#.



C# Programming
02-16-2010, 06:21 PM
I won't go into details, but I would like to start a command line program from a c# form app. What I have been doing is write the file with c# code and execute it. I have been successful in changing the directory (cd ....) in the batch file. What i need now is to have another command called ("make"). I would like to know how to do this with either a batch file line or with something from a FCL class.

To better illustrate my problem, here is an example of my programs batch output.

set path=%path%;C:/pspdev/bin // these lines are static, they don't change
set PSPSDK=C:/pspdev/psp/sdk
cmd /k cd C:\pspdev\Projects\HomebewApp // this one changes directory on cmd startup, i tried to repeat the line with the "make" command but it didn't work.