How do I run an .exe file remotely?

I need to run a .exe file remotely, and I need to be able to choose options after the .exe file runs.

Is there a way for me to make it run in the foreground, so I can send keys to it?

If not, is there a way to send keys to a process that is running in the background? I’ve tried WMI Run Process, PsExec, and Execute Program, and I can’t get any of them to work.

Hi whatever81,

It sounds like you want to run up a GUI application and then send keystrokes from the current user.

PsExec is the best application for running applications remotely. However sending keystrokes to a GUI application depends on how well it support the ui-automation framework.

https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/

Once the application is up and running in GUI mode, you could make another executable which is also run by PsExec to use this framework.

FinalBuilder and Automise have very basic keystroke calling functionality, which does not cover running applications remotely. You might be able to start a FinalBuilder script remotely with a command line that sends the keystrokes. It will very much depend on the application your attempting to interact as well.