How to run exe file remotely?

Posted on

Problem :

I have an exe file placed on a remote server. I need to invoke it from other server directly/using a batch file. When I invoke using batch file it runs and it shows in the Task manager of invoking server. Because the invoking server has security issues, the invoked exe doesn’t call few APIs and it says ‘Authentication error’ and crashes. But I want the exe to be running on the remote server as it has all the facilities on it, but remotely invoked.

Solution :

The PsExec tool may be a good idea, we may use it to exe file remotely.

Please refer to the link: PsExec v2.11

Create a service which runs the exe using sc on the command line of the remote server. Then you can use the Services Management Console to connect to the remote server and start your service.

sc create service_name binpath=C:pathtobinary [option1] [option2] [optionN]

Thanks for your inputs… The issue was that few API calls to an external website was failing because of network policies of our client over VPN connection. We did not find accurate solution to this and alternatively we solved the issue placing the exe on another server which allows calls to external webiste and modified the code accordingly and scheduled it to run as a Task in Task schedular.

Leave a Reply

Your email address will not be published. Required fields are marked *