I'm creating a PowerShell that runs a simple Java program using:
Start-Process -filepath .\java.exe -ArgumentList "Input" -NoNewWindow
The Input class in this case simply accepts and prints a string.
I'm expecting strings with length greater than the cmd.exe 8191 char limit, so I need to run it in PS.
Current scenario:
- Running the above command in the PS directly works and
Inputaccepts string greaters than 8191 char. - Saving the command in a ps1 file and run it, a PS windows appears but cmd runs behind the scene as it hits the 8191 character limit.
I tried adding -Wait as well, but not luck.
Any idea? Thank you