Sign in to follow this  
Followers 0
Dirk Diggler

ProcessSetPriority() doesn't allow to change priority

7 posts in this topic

I created very simple script:

ProcessSetPriority ( "oms.exe", 0)
ProcessSetPriority ( "vsmon.exe", 0)

These processes both running by SYSTEM account, and when I start this script by local administrator, ProcessSetPriority fails and return 0(by the way, @error also contains 0 instead 1. bug?)

But i can change priority of these processes, f.e., using Process Explorer. Why AutoIt can't do this?

Share this post


Link to post
Share on other sites



I created very simple script:

ProcessSetPriority ( "oms.exe", 0)
ProcessSetPriority ( "vsmon.exe", 0)

These processes both running by SYSTEM account, and when I start this script by local administrator, ProcessSetPriority fails and return 0(by the way, @error also contains 0 instead 1. bug?)

But i can change priority of these processes, f.e., using Process Explorer. Why AutoIt can't do this?

AutoIt cannot do this because it does repect the right of the process it is running in. Just some extra rights can be added with the RunAsSet and Run command. But in this case you cannot logged under the SYSTEM account.

Share this post


Link to post
Share on other sites

i'm not qiute sure i understood well. what should i do in this case? I want to change priority of processes running by SYSTEM account....

Share this post


Link to post
Share on other sites

i'm not qiute sure i understood well. what should i do in this case? I want to change priority of processes running by SYSTEM account....

another answer is you cannot log under SYSTEM account which is not a real user so strategy as RunAsSet cannot apply.

Share this post


Link to post
Share on other sites

i can run script by system account(by another process like nnCron). But...

It's very strange that autoit doesn't use administrative rights even has it.

It is not logical. I'am the administrator, and i want to do some things. But i can't, because Autoit "re[s?]pect the right of the process it is running in"(i didn't undestand this sentense, my English not so well)

Share this post


Link to post
Share on other sites

i can run script by system account(by another process like nnCron). But...

It's very strange that autoit doesn't use administrative rights even has it.

It is not logical. I'am the administrator, and i want to do some things. But i can't, because Autoit "re[s?]pect the right of the process it is running in"(i didn't undestand this sentense, my English not so well)

perhaps other eleviate the right security permission. AutoIt just offer the runAsSet for run command.

Share this post


Link to post
Share on other sites

ProcessSetPriority() works fine for me. I just changed the priority of vsmon.exe and it's running under the SYSTEM account. I also changed the priority of a service running under the NETWORK_SERVICE account.

Here's the important piece of information you did not provide: What operating system are you using? Things work fine on XP Pro SP2.

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  
Followers 0