Get Status of a Process from Task Manager

Hi Team,

How to get the status of any process from Task Manager??
MicrosoftTeams-image (1)

Thanks

Hi @Rahul_J

I don’t think so we have any specific activity to get the process status.

Regards
Gokul

Yes, Is there any other way to achieve the same ?

HI @Rahul_J

Try this with Get Processes activity

https://docs.uipath.com/activities/docs/get-processes
image

It will get youe all the running application
by that you can give a condition to check if item.toString.Contains(“main_csh.exe or something like that”)

Hope this Helps

Regards
Sudharsan

Hi @Rahul_J

You can open the Task manager

Use Send Hot key activity Ctrl+Shift+Esc

Get the Status for the particular process using Get Text ot CV get text activity

I’m quite not sure how it will work. Kindly check it

Team- I need to get the text (Status) of any given process.

HI @Rahul_J

I dont think we can get the text from task manager.

Yes you can also check this way

Method 1:

  • Get Processes activity
  • Give this expression in a string variable
If(String.Join(",",Processes.AsEnumerable().Select(Function(s) s.ProcessName)).Contains("Skype"),"Running","Not Running")

Expression will get all the process info that running currently in array and check if process list contains “Specific process name” True-> Running ;False-> Not Running

Method 2:

  • Get Process activity
  • Loop through all the running process and assign a boolean if the process is running
  • Based on that boolean assign status in switch true ->Running False-> Not Running

Attaching the sample xaml file
Main.xaml (13.8 KB)

Hope this Helps!

Regards
Sudharsan