How to run bat file from C # program?

so i need a simple function to run the bat file. How to do it?

+3
source share
4 answers

Take a look at Process.Start

In its simplest form, you can call it that

Process.Start("thebatchfile.bat")
+8
source

, ;

System.Diagnostics;

Process.Start(@ "C:....\thebatfile.bat" );

, , ( Bat), "()". ( ".... thebatfile", "-s - t 3600" ); . Intellisense .

+1

, , , , Microsoft.VisualBasic.Interaction.Shell.

Shell("file.bat", AppWinStyle.NormalFocus, True, -1) , , (-1 )

+1
source

Source: https://habr.com/ru/post/1746592/


All Articles