Tag Archives | access denied

How to Get Elevated Process Path in .Net

As you know retrieving process path in .Net is quite straightforward. For example if you have process instance someProcess you can get the process path by accessing someProcess.MainModule.FileName However for elevated processes the previous code snippet throws Win32Exception. Continue Reading →

1
Spread the word...Tweet about this on TwitterShare on Google+Share on RedditShare on FacebookEmail this to someone

Bugs in System.Diagnostics.Process Class

While working on an application which makes use of Process class I found several bugs which occur in special conditions. More specifically accessing StartTime or HasExited properties causes a Win32Exception with NativeErrorCode equal to five. This indicates that the exception is caused by not having enough rights to retrieve the required information.

The exception occurs under the following conditions: Continue Reading →

2
Spread the word...Tweet about this on TwitterShare on Google+Share on RedditShare on FacebookEmail this to someone