0

I have a console application running remotely in multiple computers.

I was wondering if there's any way to quit from it remotely and then start it again.

I saw the use of taskkill to quit the application, but... is that the correct way of doing it? Won't it have consequence in terms of memory usage as the application process is being forced to quit rather than terminate in a normal way?

Then, would it be possible to start the application remotely taking into account that its a console application which requires an input line of text to start?

For example:

> C:/myApp/start.exe
> Aplication running... add a command:
> ...

1

Did you try using PSTools for this purpose. If the console application runs using any process then the PSTools can help you. PSkill.exe and Psexec.exe can be used to kill a process (application) and start a process remotely. But you should aware of the remote machine username and password in order to authenticate the PSTools. If it is domain environment, then it is a easy way to perform this remote activitites.

http://technet.microsoft.com/en-in/sysinternals/bb896649.aspx

Hope this helps.

|improve this answer|||||
  • Yeah, that's what I ended up using.The only problem I'm facing is that I can start the .exe console application but then I can not add a line into its command line. – Steve Sep 23 '14 at 9:33
  • I updated my question. – Steve Sep 23 '14 at 9:34
  • I opened another question: serverfault.com/questions/630523/… – Steve Sep 23 '14 at 9:43
0

It will clear the application from memory, what is the time frame for stopping and starting it again? Reason why I ask is you could use taskkill /s <hostname> /PID <PID> or /im <imagename.exe> to do this remotely but then you’d need to execute another command to restart the process, that’s easily done with psexec,winrs or with a scheduled task.

You could also do this as a batch file, start with taskkill or psexec then continue down on another line to start the process again.

Some of these are limited to authentication obviously.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.