Question

Kill/stop openspan.runtime exe

Hi Guys,

I wanted to kill exe once process is completed. So, Is it possible to Kill/stop openspan.runtime.exe in code?

Thanks!!

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
April 10, 2017 - 7:00pm

You can kill any process in a script by calling the script below, however if you want to stop Runtime cleanly, on the Toolbox, on the Runtime tab, there is a static method you may add to an automation and call labelled "RuntimeHost.TerminateRuntime". This will trigger the shutdown of Runtime as if it were exited from the tray icon.

 

  1. foreach (var process in Process.GetProcessesByName("calc"))
  2. {
  3. process.Kill();
  4. }

Comments

Keep up to date on this post and subscribe to comments

Pega
April 10, 2017 - 7:00pm

You can kill any process in a script by calling the script below, however if you want to stop Runtime cleanly, on the Toolbox, on the Runtime tab, there is a static method you may add to an automation and call labelled "RuntimeHost.TerminateRuntime". This will trigger the shutdown of Runtime as if it were exited from the tray icon.

 

  1. foreach (var process in Process.GetProcessesByName("calc"))
  2. {
  3. process.Kill();
  4. }