Jump to content
Sign in to follow this  

[solved] Changing Process Priority Level?

Recommended Posts

In case someone cares to shared.

Trying to change the priority of a process that's running under a other user, seems to fail when using "ProcessSetPriority(WinGetProcess($hWin), $iPriorety)"

Probably for same reason the default window task-manager also refuses to do the same job.

But Sysinternals "Process Explorer" on the other hand has no problem with doing it. But that's a super-tool backed with heavy win-insider resources.

Any known way to also do this with autoit DLL'ing? Ergo: without resorting to additional external (Sysinternals) tools? (If the one's I have in mind will actually do the job. later...)

... Mmm, Could try to fire a separate "priority changing" process in the target-user-space to change the priority on the target process. Later... [working]


Erm, right, Sysinternals don't have a CMD tool in there arsenal to directly adjust the priority on a running process. Info-poll, Kill, start(remote) or Suspend/Resume they have. Last one to suspend it is a little bit to much below the minimum level I need.

Guess RunAs is back in play, again. ...


First things first.

Always good to know why something fails, when it fails (if it failed not because of wrong code use.). "Toegang geweigerd", Roger that.


Running the process-changing-code under the same user/account works well. But if you don't know the users/account under which the process is running ... you got somewhat of a catch-22 problem. (That, and the fact that STD-streams don't seems to work across different accounts.)(Don't like/care to use a temp file or register key for that ... maybe later, as it seems a possible easy workaround.)

Getting the SID of a process is of course possible ... But currently to complicated (for a reason of course) for me to dig into. (+ some less complicated (less study time) alternatives are possible in relation to intended functionality, so going that road.)

... Main topic problem solved.


Erm, Now I just need to figure out how why 'what worked in script mode' is not working in 'compiled mode'. :huh2:

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...