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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
PiotrMP006
Posts: 29
Joined: 08 Sep 2017 06:10

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

#1 Post by PiotrMP006 » 18 Dec 2023 00:23

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

IcarusLives
Posts: 162
Joined: 17 Jan 2016 23:55

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

#2 Post by IcarusLives » 18 Dec 2023 06:31

You need to either use %~f0 or define scriptName

Post Reply