tags:

views:

98

answers:

1

I'm writing an application where a user can change the Application's (process's) Basepriority

How can I do this in .Net?

Its seems I can only "get" the Basepriority value but I cant "set" it.

+1  A: 

Found it

    System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;

i was looking at System.Diagnostics.Process.GetCurrentProcess ().BasePriority which is readonly

(i know lame...)

Vivek Bernard
The base priority is not the same as the priority class. The priority class partially determines the base priority.
wj32
yes i know, I was just saying that i was looking in the wrong place, by the way are you the same Mr.Wj32 processhacker fame
Vivek Bernard
Holy cow, you're the one alright, I learned a lot of stuff from it..
Vivek Bernard