Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. @echo off
  2. set /p nazwa=Program Name:
  3. echo Wybierz Priorytet:
  4. echo 64 low
  5. echo 16384 below normal
  6. echo 32 normal
  7. echo 32768 above normal
  8. echo 128 high
  9. echo 256 real time
  10. set /p poziom=select:
  11. wmic process where name="%nazwa%" CALL setpriority %poziom%
  12. set "WMIC_CMD=wmic process where name^="%nazwa%" get /format:list ^| findstr Priority"
  13. for /f "tokens=1* delims==" %%A in ('%WMIC_CMD%') do set PRIORITY=%%B
  14. set startpriority=%priority%
  15. :start
  16. set "WMIC_CMD=wmic process where name^="%nazwa%" get /format:list ^| findstr Priority"
  17. for /f "tokens=1* delims==" %%A in ('%WMIC_CMD%') do set PRIORITY=%%B
  18. if "%startpriority%" NEQ "%PRIORITY%" wmic process where name="%nazwa%" CALL setpriority %poziom%
  19. timeout 5
  20. goto start
  21. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement