windows - How to have powershell script execute batch command in same terminal -
I have a Porschell2 script which I am trying to develop. The purpose of this script is to wrap around a batch script and choose wisely how to execute the batch script. Either I have some arguments with the lines of my code that runs like this:
& amp; $ MyCommand $ args
$ myCommand is the fully-qualified file name of the batch file that I want to run. $ ELGS This is the ELGS which works in this script, it works, besides this, $ myCommand opens a command window when I run, how do I stop it, so that the output is within the same noise shell?
What's odd is that if I execute the direct command, then it shows the way I want it. So something like this:
C: \ myCommand.bat $ args
Given that I need to choose which order to run on runtime I want to, how do I make it so that when I '& amp; To execute the command in the variable? Thanks!
using initiation
Parameters instead of code> and
:
Start-up - FilePath C: \ myCommand.bat -logumentList @ ("arg1", "arg2") - Nonvando < / Code>
Comments
Post a Comment