简体   繁体   中英

Azure DevOps Pipeline CMD task [error]Access is denied

I was trying to kill a process CJobs.exe using agent job command line execution task in Azure release pipeline.
My command is:

start /b cmd /c taskkill /IM "CJobs.exe" /F
exit

but it is giving me this error:

##[error]ERROR: The process "CJobs.exe" with PID 12569 could not be terminated.
Reason: Access is denied.

So if any one knows solution for this problem, please help.
ask if more details required in comments.

You can check the log on account of the self-hosted agent in the local service and change the account to the account you need to perform the operation.

在此处输入图像描述

在此处输入图像描述

In my case this error was solved when I did this configuration on the Azure Pipeline Agent service: I selected the option "Allow service to interact with desktop".

Configuration Services Azure Pipeline Agent

In this way, after restart the service, the pipeline executed successful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM