Home All Groups Group Topic Archive Search About

Help!! InvalidOperationException in GetProcessesByName!!

Author
27 Oct 2006 12:18 AM
Eugene
I used "Process.GetProcessesByName" method under XP with no problem.

Under Vista it throws "InvalidOperationException" if the user is not
Administrator.

Please help.

Eugene.

Author
27 Oct 2006 4:38 AM
Dominick Baier
surprise, surprise :)

Welcome to the real world (the non-admin world) - if you are not an admin
you don't have access to every process information. Be prepared for such
exceptions.

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> I used "Process.GetProcessesByName" method under XP with no problem.
>
> Under Vista it throws "InvalidOperationException" if the user is not
> Administrator.
>
> Please help.
>
> Eugene.
>
Author
27 Oct 2006 12:01 PM
Eugene
I've been a veteran of non-Admin world since 1999. This is different world.
Whoever enabled this restriction no doubt meant to make Vista more secure. In
reality I will have to set my users up as administrators so my program can
continue to function.

Please suggest any way to code around.

Thank you in advance.

Eugene


Show quoteHide quote
"Dominick Baier" wrote:

> surprise, surprise :)
>
> Welcome to the real world (the non-admin world) - if you are not an admin
> you don't have access to every process information. Be prepared for such
> exceptions.
>
> ---
> Dominick Baier, DevelopMentor
> http://www.leastprivilege.com
>
> > I used "Process.GetProcessesByName" method under XP with no problem.
> >
> > Under Vista it throws "InvalidOperationException" if the user is not
> > Administrator.
> >
> > Please help.
> >
> > Eugene.
> >
>
>
>
Author
28 Oct 2006 12:12 PM
Nicole Calinoiu
Which build of Vista are you using for your testing?


Show quoteHide quote
"Eugene" <Eug***@discussions.microsoft.com> wrote in message
news:E6C98310-51B3-4B92-960C-C7C005D50FAB@microsoft.com...
>I used "Process.GetProcessesByName" method under XP with no problem.
>
> Under Vista it throws "InvalidOperationException" if the user is not
> Administrator.
>
> Please help.
>
> Eugene.