cancel
Showing results for 
Search instead for 
Did you mean: 

Kill Process

LeonardoMalaqui
Level 2
I have a process list, and inside it we have two process called notepad.exe for two different user, Paul and Robert. How can I kill notepad.exe process only for Paul's user using .NET?
8 REPLIES 8

LeonardoMalaqui
Level 2
Like as: taskkill /F /IM notepad.exe /FI ""USERNAME Paul""  

DaveMorris
Level 14
Do you need to kill the process? Is it not possible to attach to it and then use the Terminate action in a Navigate stage?
Dave Morris 3Ci at Southern Company Atlanta, GA

AmiBarrett
Level 12

If you're determined to go the .NET route, you can do the following as a C# code stage, where proc is the process name. IE: ""notepad.exe"". Just make sure you add System.Diagnostics as a namespace reference. Looks like you can add a user check to it by running a session query, as shown here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/aeff7e41-a4ba-4b… . Though the taskkill solution is definitely a lot simpler, haha.  

foreach(Process p in Process.GetProcesses())
{
	if (p.ProcessName.ToLower().Equals(proc.ToLower()))
		p.Kill(); 
}

Hi can you please tell me how can i kill cmd?

------------------------------
Sahil Chankotra
------------------------------

Hi Sahil,

Please use the Utility Environment-> Action name Kill Process, provide process name "cmd" and you will able to kill the command prompt.

------------------------------
Akhil Thukral
Application Development Module Lead - Blue Prism
Telus International
Asia/Kolkata
------------------------------

Hi Akhil,

Thanks for your help.
I am working on the python code stages. can you please help me or do you know any Link where I can get more details related to python code stages?

------------------------------
Sahil Chankotra
------------------------------

HI Sahil,

Please use this VBO for Python Scripting.

https://digitalexchange.blueprism.com/dx/entry/3439/solution/blue-prism---script-execution-vbo-2

------------------------------
Akhil Thukral
Application Development Module Lead - Blue Prism
Telus International
Asia/Kolkata
------------------------------

Hi Akhil,

I am trying to open the above link but I'm unable to open that. I did login logout multiple times. Please suggest me.

30945.png

------------------------------
Sahil Chankotra
------------------------------