How can I run a batch from from within vb.net?
+1
A:
The best way is to use the Process.Start
and pass the path to the batch file
Process.Start(pathToBatchFile)
JaredPar
2010-02-01 18:02:45
+1
A:
Simple and straight forward method
System.Diagnostics.Process.Start("c:\vivek.bat")
Vivek Bernard
2010-02-01 18:03:46
+1
A:
You can use the Process class to run a batch file
Dim psi As New ProcessStartInfo("Path TO Batch File")
psi.RedirectStandardError = True
psi.RedirectStandardOutput = True
psi.CreateNoWindow = False
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.UseShellExecute = False
Dim process As Process = Process.Start(psi)
RHicke
2010-02-01 18:03:54
A:
'The easiest way if you know the exact location of the file is
System.Diagnostics.Process.Start("c:\test\file.bat")
'In Visual Studio the file must exist in the /bin/debug or /bin/release depending on your current build configuration
System.Diagnostics.Process.Start("test.bat")
djbaldwin
2010-02-01 18:11:37