Uipath Kill Process

image
Please xplain the difference between process and process name

Also explain the meaning of

only current user
only current session
only current desktop

1 Like

Hi @Ritaman_Baral

Check on this document

https://docs.uipath.com/activities/other/latest/workflow/kill-process

Cheers!!

Cool let’s go one by one

Process: The “Process” parameter refers to a running process that you want to terminate. You provide this parameter if you know the exact process instance that you want to end. You need to pass a reference to the running process using this parameter. For example, you might obtain a process object using the “Get Processes” activity and then pass that object to the “Process” parameter.

Process Name: The “Process Name” parameter is a user-friendly way to specify the name of the process you want to terminate. You provide the name of the process without the file extension. This is a simpler option when you know the name of the application you want to close but don’t have a reference to the actual process instance.

Only Current User: When selected, the “Kill Process” activity will only terminate processes running under the context of the currently logged-in user. It won’t affect processes running under other user accounts.

Only Current Session: This option restricts the termination to processes running within the current session of the user. It won’t end processes in other active user sessions.

Only Current Desktop: This means the activity will only terminate processes running on the current desktop. Each user session can have multiple desktops, but this option limits the termination to the current one.

Hope this clarifies

Cheers @Ritaman_Baral

Suppose in process we pass “chrome” then what do we need to pass in “process name” ?
Can you elaborate the last 3 using examples

1 Like

You only pass one or the other, not both. You don’t pass “chrome” in Process, you would put an object reference in that property. If you just want to give it “chrome” then put that into the process name property.

you only need to pass “Chrome” in process name
for example : 1.IF you want to kill excel then mention “Excel” in the process name
2.if you want to kill chrome then mention “Chrome” in process name
you only pass one or the other not both.

Go through this docs for better understanding
https://docs.uipath.com/activities/other/latest/workflow/kill-process

@Ritaman_Baral

If you are doing a get processes then you use the process field to pass the output of that activity…if not you can use process name alone to give the name

Only either one of it needs to be populated

Cheers

Sure for these

  1. Only Current User:
  • When you select this option, the “Kill Process” activity will terminate processes that are running under the context of the currently logged-in user.
  • It won’t affect processes running under other user accounts.
  • This is useful when you want to end processes that belong to the user who initiated the automation.
  • Example: Suppose you are logged in as “UserA,” and you run an automation using UiPath. If you use “Only Current User,” it will terminate processes that “UserA” started but won’t affect processes started by “UserB” on the same machine.
  1. Only Current Session:
  • This option restricts the termination to processes running within the current session of the user.
  • It won’t end processes in other active user sessions.
  • Useful when you want to target processes only in the current session, even if multiple users are logged in simultaneously.
  • Example: On a remote desktop server with multiple user sessions, if you are in session 1 and select “Only Current Session,” it will terminate processes in session 1 but not those running in session 2.
  1. Only Current Desktop:
  • Selecting this option means the activity will only terminate processes running on the current desktop.
  • Each user session can have multiple desktops, but this option limits the termination to the current desktop.
  • Useful when you have multiple desktops within a single user session, and you want to target processes on the current desktop.
  • Example: In scenarios where you have a virtual desktop infrastructure (VDI) setup, you might have multiple desktops for a single user session. “Only Current Desktop” will ensure it only terminates processes in the current desktop and not others within the same session.

for the “Process Name” field, you would provide “chrome”

Hope this clarifies

Cheers @Ritaman_Baral

2 Likes

Hi,

  1. Process vs. Process Name:

    • A process in UiPath is like a set of instructions for a computer program to do specific tasks automatically.
    • The process name is just a name you give to that set of instructions so you can recognize it easily.
    • Only Current User: This means that UiPath will only stop processes that are being used by the same person who is running UiPath. It won’t stop processes used by other people on the computer.
    • Only Current Session: It will only stop processes in the same “session,” or when a person logs into a computer. If multiple people use the same computer with their own accounts, it won’t affect their processes.
    • Only Current Desktop: This option makes sure that UiPath only stops processes on the screen or “desktop” where it’s working. If you have multiple desktops, it won’t interfere with processes on other desktops.

Hi

  1. Process Property:
  • When you use the “Process” property, you are required to provide a Process variable as its input.
  • This Process variable should contain information about the target process, including its name, process ID (PID), and any additional properties you want to specify.
  • This approach is useful when you have more detailed information about the target process, such as its PID, and you want to be specific about which process to terminate.
  1. Process Name Property:
  • When you use the “Process Name” property, you only need to specify the name of the process you want to terminate. This can be the name of the executable file (e.g., “notepad.exe” for Notepad) or the display name of the application (e.g., “Microsoft Excel” for Excel).

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