Reputation: 143
I know how to run cmd in vb.net, by using the Shell "cmd.exe /k <command>
command, but how do you execute multiple lines using it, or do you use something else?
Upvotes: 2
Views: 4898
Reputation: 18310
CMD commands are separated by the ampersand. For instance:
cmd.exe /k <command 1> & <command 2> & <command 3>
An example .NET solution would be:
Process.Start("cmd.exe", "/k <command 1> & <command 2> & <command 3>")
For more see Microsoft's Command Shell documentation.
Upvotes: 2