Sign in to follow this  
Followers 0
TechDragon

How do i: Set process priority correctly

3 posts in this topic

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)

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

no you are 100% right, silly mistake on my part. Sometimes you just need a different set of eyes

Thank you

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