I'm writing my own task manager as I often change process priorities but have gotten myself into trouble on several occasions. I have discovered by keeping csrss.exe and explorer at the equal highest priority, I can keep the computer running ok, or at least recover. So that's what my program does - keeps itself and those programs with high enough priority. It works great when run from visual studio, but as soon as i run it directly (whether in release or debug mode) I cannot access the process priority of csrss.exe. Is this a security issue
The error message begins like this
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box
************** Exception Text *************
System.Componen tModel.Win32Exc eption: Access is denie
at System.Diagnost ics.ProcessMana ger.OpenProcess (Int32 processId, Int32 access, Boolean throwIfExited
at System.Diagnost ics.Process.Get ProcessHandle(I nt32 access, Boolean throwIfExited
at System.Diagnost ics.Process.Get ProcessHandle(I nt32 access
at System.Diagnost ics.Process.set _PriorityClass( ProcessPriority Class value
at MyTaskManager.M yTaskManager.Me _Load(Object sender, EventArgs e) in C:\Documents and Settings\Richar d Hart\My Documents\Visua l Studio Projects\MyTask Manager\Form1.v b:line 11
The error message begins like this
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box
************** Exception Text *************
System.Componen tModel.Win32Exc eption: Access is denie
at System.Diagnost ics.ProcessMana ger.OpenProcess (Int32 processId, Int32 access, Boolean throwIfExited
at System.Diagnost ics.Process.Get ProcessHandle(I nt32 access, Boolean throwIfExited
at System.Diagnost ics.Process.Get ProcessHandle(I nt32 access
at System.Diagnost ics.Process.set _PriorityClass( ProcessPriority Class value
at MyTaskManager.M yTaskManager.Me _Load(Object sender, EventArgs e) in C:\Documents and Settings\Richar d Hart\My Documents\Visua l Studio Projects\MyTask Manager\Form1.v b:line 11
Comment