Click here to Skip to main content
14,577,799 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have a VB.NET app that needs to run .bat files to work, and im just wondering if I can make my app run multiple commands when I press a button.

What I have tried:

Making my app run a .bat file from a preset directory
Updated 29-Jun-20 18:44pm
Dave Kreskowiak 30-Jun-20 0:11am
Yes. It's just launching another Process, exactly like you would for running one command. You just launch another one for the next command.

But, you haven't shown the code you've written for launching anything, so it's a bit difficult to tell you anything specific about your implementation.

Also, why would you .BAT files when you can do the same things directly in code?
OakBricks 30-Jun-20 1:59am
I used .bat files because it's one of my first projects in VB.NET and I think its System.Diagnostics.Start.Process("C:\Folder\bat.bat

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Private Sub Form1_Click(sender As Object, e As EventArgs) Handles Me.Click
   End Sub
OakBricks 30-Jun-20 14:43pm
This is what I did to run the .bat files im wondering if I can do this : Process.Start("C:\Path\To\App.exe -Arg XXXX:)
kgmmurugesh 1-Jul-20 0:05am
Yes, You can run any type of executable files (.bat, .exe, .com etc).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100