Well what version you are using?
Well i guess you are also using the Version 18.1
So with the latest version from my perspective and i have checked as well
above command is not able to kill a UiRobot service and its chiild processes which are running under user sessions.
but on the other hand if you will use taskkill /F /Im uirobot.exe.
you will be see that it killed all the running process including parent Uirobot process.
Well there is difference between /Im and /F parameter is /Im - It send the WM_Quit message to the specified process.
/F - It send the WM_Close message to the specific process.
Difference B/W WM_QUIT and WM_CLOSE
WM_QUIT - Indicates a request to terminate an application, and is generated when the application calls the PostQuitMessage function. This message causes the GetMessage function to return zero.
WM_CLOSE - Sent as a signal that a window or an application should terminate.
A window receives this message through its WindowProc function.
Most likely taskkill /f uses TerminateProcess, where as taskkill without /f just posts a WM_QUIT message (not WM_CLOSE). The docs says that TerminateProcess unconditionally kills the process.
You can try following experiments:
-> Launch notepad.exe and type a few chars in the notpad window type taskkill /f /im notepad.exe. Notepad will quit immediately
Now do this:
-> Launch notepad.exe and type a few chars in the notpad window type taskkill /im notepad.exe. Notepad won’t quit immediately but it will quit ask if you want to save modifiactions.
so in uipath why it is not killling might be it is waiting for the update of postquit message but if you will kill by /Im it is waiting for someconfirmation in the background.
but on the other hand by using /F the case is different as mentioned reason above.
or you can try to terminate the child process as well by using below command.
Taskkill /Im UiRobot.exe /T
will kill all child process of uirobot even under user session as well.
and most Important if you will kill a process on uipath studio start it will run again in the background. and even without that it will get automatically start what i have observed.
Still waiting for some more time to see this under the hood.
Space shouldn’t be an issue. Batch or Powershell should work as long as it is killing the specific Child process.
Basically when the daily scheduled process fails for some reason, we run the process via manual job.I want to kill them at the end of the day, so the next day scheduler doesn’t throw “Robot is Already running” or “Pending” messages. Thanks.