[Solved] How do I embed a batch file in a vb program? [closed]


1) It’s probably silly to have a separate .bat file if you can do everything you want directly in the VB program. Have you considered just incorporating the functionality directly in VB?

2) To run a separate .bat file from VB.Net, perhaps the easiest way is to use Process.start().

EXAMPLE: System.Diagnostics.Process.Start("c:\path\to\myfile.bat")

3) Finally, you can always a) create a text file (with a .bat suffix and your .bat commands) on the fly, then call “Process.Start()” on your dynamically-created .bat file.

PS:

I assume by “VB” you probably mean “VB.Net”. If you mean “VB6”, the API would be “Shell()”. For example: Shell("c:\path\to\myfile.bat", vbHide).

7

solved How do I embed a batch file in a vb program? [closed]