Hi Everyone,
How do you execute a .bat file from within VB?
Printable View
Hi Everyone,
How do you execute a .bat file from within VB?
This should work ;)
VB.NET Code:
System.Diagnostics.Process.Start("NameOfFile.bat")
You can also use the ProcessStartInfo class when calling process.start() to tell Windows to not create any window when it runs the batch file. This way you won't see the flash of the cmd prompt window when the batch file runs.
Or This :D
VB.NET Code:
System.Diagnostics.Process.Start("cmd.exe", "NameOfFile.bat")
thank you for your suggestions. they really helped me out.