Deleting a user profile folder

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Hello all. Hopefully I can get some help...

I have created a little C# console app that we needed to delete certain
user profiles from the documents and settings directory. But lo and
behold I get an error.

Access to the path 'path' is denied.

I have deleted the folders manually with no problems and I have
verified that the console app is running under my credentials (local
admin).

I hope for a reply soon as it took me 10 minutes to create the app and
hours of googling to try and find an answer...


Any ideas?

Thanks,

Ed
 
You might try this, but I was not ableto get it to work for me:

Dim prm As New
System.Security.Permissions.FileIOPermission(Security.Permissions.FileIOPermissionAccess.AllAccess, profileDir)
prm.Assert()
 
Back
Top