0

I run a pre-scripted program (VisualSfm) from Powershell. Each implementation ends with the text 'VisualSFM has exited! Press ENTER to continue...', which effectively halts any further commands.

Can I somehow skip or auto-input ENTER to this, in my Powershell command?

I have tried to insert 'echo ~ |', which works good for my own 'pause'-commands in batch and .ps1. But it does not work in the command, e.g.

echo ~ | Visualsfm.exe input output

gives the same prompt for 'ENTER' to continue. Also, only 'ENTER' is accepted as command.

How can I skip the prompt of ENTER input to continue?

  • Does `Visualsfm.exe` read from its standard input? Normally I use `< nul` in batch (for eg. `set /p =Normally you have to press enter < nul` or `pause < nul` but this can lead to unexpected behaviour if the program uses its standard input for something else. As I don't know nor have `Visualsfm` I can't tell if it will work – J.Baoby Feb 14 '17 at 12:59
  • Does the executable have any switches that might cater for this behaviour already? http://stackoverflow.com/questions/8869219/how-can-i-find-out-if-an-exe-has-command-line-options – gvee Feb 14 '17 at 13:34
  • @J.Baoby : How would I implement < nul in my command? – Rasmus Gustafsson May 15 '17 at 13:25
  • @gvee I browsed through those commands but there were no switches that could cater for this – Rasmus Gustafsson May 15 '17 at 13:27
  • At the end of your command will do. So instead of executing ` Visualsfm.exe input output` execute `Visualsfm.exe input output < nul` – J.Baoby May 15 '17 at 19:48

0 Answers0