2

Using the command

wmic process where processid= 2140 CALL setpriority 128 (found here)

I am trying to change the priority of a specific process (PID 2140).

enter image description here

Running the command it gives me the following output:

enter image description here

Checking the specific process using TaskManager it still has prio "normal".

I tried to find the meaning for the "return value" but I do not find it. I think it is telling me an error.

What am I doing wrong and where do I find the error/return codes?

Thank you.

4

Error codes are listed on the official technet help articles.

In this particular case Code 5 would mean Access denied.

ERROR_ACCESS_DENIED 5 (0x5) Access is denied.

You probably need to run the command from within the same user context or use an administrative access to change the process priority.

See also Changing Windows process priority via command line for some more options. It's likely going to be easier to start the process with a given priority e.g. using START.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.