' Kod ustawia priorytet procesu

Const NORMAL         = 32
Const IDLE           = 64
Const HIGH_PRIORITY  = 128
Const REALTIME       = 256
Const BELOW_NORMAL   = 16384
Const ABOVE_NORMAL   = 32768

' ------ KONFIGURACJA SKRYPTU ------
strComputer = "."
intPID      = 3280          ' wstaw identyfikator PID danego procesu
intPriority = ABOVE_NORMAL  ' wstaw jedn z powyszych staych
' ------ KONIEC KONFIGURACJI ---------
WScript.Echo "Identyfikator PID procesu: " & intPID
set objWMIProcess = GetObject("winmgmts:\\" & strComputer & _
                    "\root\cimv2:Win32_Process.Handle='" & intPID & "'")
WScript.Echo "Nazwa procesu: " & objWMIProcess.Name
intRC = objWMIProcess.SetPriority(intPriority) 
if intRC = 0 Then
   Wscript.Echo "Ustawianie priorytetu zostao zakoczone powodzeniem."
else
   Wscript.Echo "Nie mona byo ustawi priorytetu. Kod bdu: " & intRC
end if
