[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

WinXP: What permission needed for Process.WaitForExit()?

Bert Hyman

11/7/2011 10:21:00 PM

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 bert@iphouse.com
1 Answer

Peter Duniho

3/3/2011 4:32:00 AM

0

On 3/2/11 1:29 PM, Bert Hyman wrote:
> 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