Page 1 of 1

How can a batch lower the priority ONLY of the cmd that runs it?

Posted: 18 Dec 2023 00:23
by PiotrMP006
Hi

How can a batch lower the priority ONLY of the cmd that runs it?

Why isn't this code working?

Code: Select all

wmic process where "name='cmd.exe' and commandline like '%%scriptname%%'" call setpriority "high"
Please help

Re: How can a batch lower the priority ONLY of the cmd that runs it?

Posted: 18 Dec 2023 06:31
by IcarusLives
You need to either use %~f0 or define scriptName