473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Deleting a user profile folder

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

Oct 4 '05 #1
1 1916

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

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

"Ed" wrote:
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

Oct 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Rosa | last post by:
Hi, I'm trying to clear the TIF on Windows XP programmatically with the below code. This code works fine on any folder but the TIF. For some reason the atEnd() statements always defaults to true...
13
by: Bob Darlington | last post by:
I have a repair and backup database routine which runs when a user closes down my application. It works fine in my development machine, but breaks on a client's at the following line: If...
0
by: Pavils Jurjans | last post by:
Hallo, After installing the dot-NET framework on my PC, I see that a new user profile has been created. I wouldn't bother if that would be just a new 'user' created, but why the whole profile?...
5
by: George | last post by:
VB.net 2003 standard, XP windows home edition. Installed first application OK today. When I removed the application via Control Panel, there were no problems and the app folders were deleted. ...
0
by: steven.shannon | last post by:
Hello, I'm writing an app that involves deleting all the items in a specified Outlook folder regardless of item type (i.e. Contacts, Tasks, etc.). This code was ported from VBA where it worked...
2
by: Iceken | last post by:
Hi, In my app I need to delete several user profiles inside the Documents and Settings folder. But everytime i try Directory.Delete(path) I get a IOException with "Access denied to path ..",...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
1
by: Microsoft News Group | last post by:
I am setting up a customer portal. I am setting up users, and then deleting them. But if I set up a user with the same name I deleted. Then I get this error. The user 'Flynn' is already in...
12
by: wheels619 | last post by:
How can I get access for another user's special folder locations? A configuration file is stored in the users' appData folder and the program altering it will be ran under the admin.
3
by: lkjhgfdsa | last post by:
Hi I create a user account in active directory and set the profile value (fill the "homedirectory" and "homedrive" properties and update user account). When I do this steps in "Active Directory...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.