Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set /p nazwa=Program Name:
- echo Wybierz Priorytet:
- echo 64 low
- echo 16384 below normal
- echo 32 normal
- echo 32768 above normal
- echo 128 high
- echo 256 real time
- set /p poziom=select:
- wmic process where name="%nazwa%" CALL setpriority %poziom%
- set "WMIC_CMD=wmic process where name^="%nazwa%" get /format:list ^| findstr Priority"
- for /f "tokens=1* delims==" %%A in ('%WMIC_CMD%') do set PRIORITY=%%B
- set startpriority=%priority%
- :start
- set "WMIC_CMD=wmic process where name^="%nazwa%" get /format:list ^| findstr Priority"
- for /f "tokens=1* delims==" %%A in ('%WMIC_CMD%') do set PRIORITY=%%B
- if "%startpriority%" NEQ "%PRIORITY%" wmic process where name="%nazwa%" CALL setpriority %poziom%
- timeout 5
- goto start
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement