title: How can i kill all processes in clients that run a program(by shortcut) at server
body: <p>I have a program on a server(for example <code>\\192.168.0.1\sharefolder\test.exe</code>). I put the shortcut of program into clients. Users can run the program by that shortcut. When I want to update my program in server, it occurs an error says "file in use".. now, how can I kill all processes in clients that run my program (by shortcut) on server.
  I use this code:</p>
  
  <pre><code>foreach (var process in Process.GetProcessesByName("quartus_pgm"))
  {
           process.kill();
  }
  //file.delete();
  </code></pre>
  
  <p>But this code is not enough because this code only kill processes running on the server and still I can not update the program and the error occurs..</p>