Jump to content

How do i: Set process priority correctly


Recommended Posts

Hello,

Trying to do something simple but it is not working. I am trying to run jkdefragcmd at logon and then change the priority to low, I can do this manually but not with the script below. I tried it with and without the sleep command, just put it in there thinking that the code may have executed before the process existed.

Any ideas?

Run ("jkdefragcmd.exe c: -a 3 -s 25 -q","", @SW_HIDE)
Sleep(10000)
ProcessSetPriority("jkdefrag.exe", 0)
Link to comment
Share on other sites

Hello,

Trying to do something simple but it is not working. I am trying to run jkdefragcmd at logon and then change the priority to low, I can do this manually but not with the script below. I tried it with and without the sleep command, just put it in there thinking that the code may have executed before the process existed.

Any ideas?

Run ("jkdefragcmd.exe c: -a 3 -s 25 -q","", @SW_HIDE)
Sleep(10000)
ProcessSetPriority("jkdefrag.exe", 0)
Hi,

maybe a writing fault, but if not:

change ProcessSetPriority("jkdefrag.exe", 0)

to

ProcessSetPriority("jkdefragcmd.exe", 0)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...