Groups | Blog | Home
all groups > dotnet framework > june 2007 >

dotnet framework : directory class


AVL
6/28/2007 5:08:03 AM
hi,
i've used Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)
method to
return the files in a given path....

but i've a small concern here...whenever I give path like "d:\", i'm getting
an unauthorizedaccess exception...this is because i'm not able to read certain
directories like 'system volume information'...etc..

Kevin Spencer
6/28/2007 9:25:43 AM
Your app would have to impersonate an administrator.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

[quoted text, click to view]

KK
6/28/2007 9:09:36 PM
PLEASE give some more info on how to do that...


[quoted text, click to view]

Kevin Spencer
6/29/2007 8:13:30 AM
http://www.codeproject.com/useritems/User_Impersonation_in_Ne.asp

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

[quoted text, click to view]

AddThis Social Bookmark Button