Wednesday, December 15, 2010

live process priority changing

 

Today I wanted to lower the priority of a McAfee Full Scan going on my system, as it was seriously hosing my work PC.  Yes I could have used the old AT trick to get system priv. but my work pc is fairly locked down w/o Task Scheduler running.  Yes, I could have killed the process and restarted it with a low priority with the start command.  The only problem was that it was about 1/4 of the way through, and I did not feel like starting over.  I tried going into task manager and adjusting the priority, but of course I got an “Access Denied” message.  What to do?

psexec /s /i /d taskmgr

This will launch task manager with SYSTEM privileges, so you can go ahead and change that process priority.  /s gives it system powers, /I makes it interactive so you can see it in the same session, and /d detaches the psexec from your cmd to free it up from your console.  You’re going to need admin privileges for this psexec switch, so don’t go thinking it’s a “hack”.  However with LSA powers you can do a lot of interesting stuff that even an Admin cannot.