0

I have an .exe file on server and clients have the shortcut of that exe for running. Sometimes we update that exe and to change it we have to stop the directory file sharing to kick clients and open again. I would like to have an easier way to do that with another program in C#. If its possible i want to do it with specified client also.

CanESER
  • 301
  • 1
  • 3
  • 19
  • You can kill all the open handles in Computer Management, but you can’t kill remote processes unless you’re in an AD domain and have the necessary permissions. – Dai May 17 '19 at 11:47
  • Change *"shortcut of that exe for running"* into real communications and you may have a chance. – Sinatr May 17 '19 at 11:47
  • @Sinatr unfortunatelly system doesnt allow that to do – CanESER May 17 '19 at 11:49
  • You can use windows service which is running on background and check commands which came from you. And if command is stop, winservice can stop your exe. Maybe you need to get admin permission to your service. – Mert Akkanat May 17 '19 at 11:50
  • @Dai I already have to do it with that way or stop sharing that directory. But my pupose is doing that with a c# app – CanESER May 17 '19 at 11:51
  • @MertAkkanat I have an admin permission but actually i havent understand what u mean clearly, could u explain more detailed please – CanESER May 17 '19 at 11:55
  • Create a new winservice which is control regularly your update mecanism, if there is an update, windows service going to kill your exe. You can see how to start below, change this code to kill exe [https://stackoverflow.com/questions/3719126/how-to-run-an-exe-from-windows-service-and-stop-service-when-the-exe-process-qui] – Mert Akkanat May 17 '19 at 12:00

0 Answers0