Kill 3 processses

Hey all

I want to kill the processes from my uipath.
there 2 process - SAP and Excel and Access DB.

Note: only those 3 above process…
So i did the following program


In the - For each i have changed the - Typeargument .

Can any one please help me.

Regards,
Sonika

@Seem

Go to Exclamatory mark on Kill Process and show me what is the exact error.

Have you passed process name under “ProcessName” field right ?

image

@lakshman

Yeah i have given - item.ProcessName

But it will kill all the processes.

So how to kill specific processes from the loop?

Regards,
Sonika

@Seem

Because you looped all the process. That’s why it killed all processes.

For this, Take one IF condition inside for loop.

IF item.ProcessName.Tostring.ToLower.Contains(“excel”)
Then use Kill Process activity and specify processName as item.ProcessName
Else skip

It will Excel process only.

1 Like

Hey @Seem

Go through with this existing thread -

This might help you :slight_smile:

Regards…!!
Aksh

2 Likes

Hi buddy @Seem

Kindly follow the below steps that could help you resolve this issue

  1. Inside the for each loop, in kill process, in process property, pass the variable from for each loop Item like this

    Where Item is the variable that we get from for each loop which has the collection of processnames…

Simple buddy…you were almost done…
Kindly try this and let know whether this works or not buddy
Cheers @Seem

1 Like

Hi All,

Thanks for all your help and quick replies…
I did it in a different way.
Took an array and gave the process names as below, and killed them
image
image

It worked for me.
Its easy.

Thank you All,

Regards,
Sonika

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.