Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I call a script (*.cmd) file from within a .NET application?

I have to run a .cmd script file from my .net code. Deos anyone know what class and method I can use to accomplish this in a .net application?
0 Kudos
Message 1 of 2
(2,938 Views)
You can do this with the Process class. The simplest solution is to specify the path of the .cmd script to the static Start method. You can customize the behavior if necessary by creating an instance and setting properties or configuring a ProcessStartInfo and passing that to the Start method.

- Elton
Message 2 of 2
(2,935 Views)