Page 1 of 1 1
Topic Options
#167111 - 2006-09-08 08:34 PM OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I hate the fact that windows media player eats all resources from the system when left with normal priority.
it doesn't eat CPU much but all other processes hang all the time, so it seems to reserve all the memory bandwidth there is.

realised that setting the priority lower made the system lot more stabile.
but I need to do this every time I want to listen to music.
so, is there a reg value or something I can set, so the priority is always low for it???
_________________________
!

download KiXnet

Top
#167112 - 2006-09-08 09:42 PM Re: OT: howto set process' priority low for good?
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
I think the only way would be to use START /LOW and make a script to run it that way. I'm not 100% but I don't think the normal shortcuts have a way to do it.
Top
#167113 - 2006-09-08 09:57 PM Re: OT: howto set process' priority low for good?
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
http://www.actualtools.com/windowmanager/help/features/priority.php
Top
#167114 - 2006-09-08 10:57 PM Re: OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
gargoyle... well, 40$ is not much, but wasn't planning on paying for something so trivial.
Top
#167115 - 2006-09-08 11:42 PM Re: OT: howto set process' priority low for good?
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
But it sounded like it would fix your issue? You never said it had to be free And if there is program to do it, Jooel can find a KiX way to do it.
Top
#167116 - 2006-09-09 12:01 AM Re: OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, this looks nicer...
http://www.wiredprairie.us/journal/2005/12/set_process_priority_utility.html

just wonder, why doesn't windows provide a way to control the basePriority via a regvalue or so.
or in other words, why that function is not documented.

Top
#167117 - 2006-09-09 01:08 AM Re: OT: howto set process' priority low for good?
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
SetPriority Method of the Win32_Process Class
Top
#167118 - 2006-09-09 01:20 AM Re: OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
allen, yep. saw that too.
that requires one to write a script and pass the process filename as parameter...
decided I can use a tool for that. (getting lazyer each day)

Top
#167119 - 2006-09-09 02:47 AM Re: OT: howto set process' priority low for good?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Funny, comment by someone at the link by Jooel is to increase priority for Media Player - and Jooel wants it for the opposite.
Top
#167120 - 2006-09-09 12:41 PM Re: OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice catch.

btw, just got thinking about it and this setprio just might not be the one.

Top
#167121 - 2006-09-09 04:26 PM Re: OT: howto set process' priority low for good?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
did a simple udf for it, but...
can't set the priority of kixtart process.
get access denied error. and not from com object itself...

Code:

function SetPriority($prio, optional $pid, $iName)
dim $wmi,$list,$process

$wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

if len($iName)
$list = $wmi.ExecQuery("Select * from Win32_Process Where Name = '"+$iName+"'")
else
$list = $wmi.ExecQuery("Select * from Win32_Process Where ProcessID = '" + $pid + "'")
endif
For Each $process in $list
$setPriority = $process.SetPriority($prio)
Next
exit @error
endfunction

"setting the prio of this process to low."
?
setPriority(16384,@pid)
?
get $


Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.06 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org