0

Is there a way i can execute multiple commands in c# without writing it to a batch file first?

I have found how to do that using batch file. But I need to know how to do this without creating a batch file.

user1211499
  • 155
  • 1
  • 10

1 Answers1

0

You can use Process Class:

Process Class Provides access to local and remote processes and enables you to start and stop local system processes.

  myProcess.StartInfo.UseShellExecute = false;
  myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
  myProcess.StartInfo.CreateNoWindow = true;
  myProcess.Start();