Discussion:
WinXP: What permission needed for Process.WaitForExit()?
(too old to reply)
Bert Hyman
2011-03-02 21:29:55 UTC
Permalink
XP Pro SP3

I wrote a short C# app to allow my backup to wait for another program to
finish before proceeding. It boils down to basically

using System.Diagnostics;
Process[] av = Process.GetProcessesByName("avscan");
av[0].WaitForExit();

Unfortunately, this appears to require permission even beyond being a
member of the "Power User" group.

So rather than add the user that does backups to the Administrators group,
is there a specific permission that I can add to that user so that it can
use these functions?

I've seen references to "Performance Monitor Users," but that doesn't exist
on my XP Pro SP3 system.
--
Bert Hyman St. Paul, MN ***@iphouse.com
Peter Duniho
2011-03-03 03:32:42 UTC
Permalink
Post by Bert Hyman
XP Pro SP3
I wrote a short C# app to allow my backup to wait for another program to
finish before proceeding. It boils down to basically
using System.Diagnostics;
Process[] av = Process.GetProcessesByName("avscan");
av[0].WaitForExit();
Unfortunately, this appears to require permission even beyond being a
member of the "Power User" group.
So rather than add the user that does backups to the Administrators group,
is there a specific permission that I can add to that user so that it can
use these functions? [...]
I don't know if there is a lesser security group that would allow the
admin-required operations in Process to work.

But, assuming your user is the one that started the "avscan" process,
you don't need special rights to monitor and otherwise interact with
that process.

If your user is _not_ the one that started the "avscan" process, I think
it's perfectly reasonably to require admin rights to detect and monitor
the process. It would be a significant security problem to allow otherwise.

Pete

Loading...