How to kill processes for a specific user?
- Get the current user name by Environment.UserName. Store it in a variable
- Get the List of all Processes running under current user
- Use a "ForEach" activity and loop through all process names
- Use an "If" activity inside the loop and check if the below condition is met or not for the "If" activity
- processName=“YourProcessName” AND UserName= Environment.UserName
- If the condition is met then use "Kill Process" activity inside the "Then" block of "If" activity to kill the process.