Kill a process only if it’s running,

Hi @Stef_99

Can you try like below

currentProcess.ProcessName.ToLower().Contains("chrome") Or currentProcess.ProcessName.ToLower().Contains("excel")

or You can directly give like below if the process is opened then it will close

image

Check this

Regards,

1 Like