0

I need to run exe file on command prompt to pass some parameters and in the code of exe file i have run a bat file using VB.NET built-in shell method, but when run exe file on command prompt the shell method seems printed the entire code of the bat file out into cmd, this is not allowed. Example:

Shell("any code and path to file", AppWinStyle.Hide)

Note: I have to run this bat file with shell method of VB.NET

djv
  • 15,168
  • 7
  • 48
  • 72
tedd
  • 141
  • 1
  • 9
  • Use the `Process` class. You can specify arguments as described [here](https://stackoverflow.com/a/51682585/7444103) (see the commented lines on top of the `StartCmdProcess()` method) and also the visibility of the Command prompt (also described there). – Jimi Mar 24 '22 at 16:31
  • @Jimi, I'm only allowed to run with shell methods and edit the `"any code and path to file"` part – tedd Mar 24 '22 at 16:45
  • 1
    Well, try `Shell("Some path", AppWinStyle.Hide, True)` – Jimi Mar 24 '22 at 16:57

0 Answers0