0
This seems like not possible. I've been trying to launch a batch file which has to run in foreground of the user session.
so I ssh to Cygwin of remote host and run the batch file and it always ends up in background.
ssh@Cygwin: cmd /c start.bat
Any suggestion to make it run in foreground?
Right now its just a dummy batch file but I want to create something that'll run in foreground which displays some stats.
If you could create a scheduled task remotely and ensure it's set to run as that user account which is logged on that you want to see the screen, and with the option Run only when the user is logged on and execute the batch from there then that may work but you'd have to test to see if this is possible but I know when a scheduled task executes with that option as the user that the command window will be launched on the screen as that user session. You might try
cmd /k
too by the way and see if that makes any difference. – Pimp Juice IT – 2018-07-16T16:03:36.210