Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting XP Profiles

Status
Not open for further replies.

NFI

Programmer
Jun 7, 2000
278
GB
Hiya,

Does anybody know how I can completely delete a profile (files and directories) under Windows XP? I've written a service which looks for specific profiles at startup and then deletes them by moving recursively through the directory structure, removing the files and directories using DeleteFile(<filename>);

The problem is that, although I can empty the entire profile directory structure of files, I can't seem to get rid of the directories. I've tried removing read-only attributes from the directories before I delete them with FileSetAttr(<filename>,<attr>); but that doesn't help.

I was wondering if the profile folders are protected system folders and there are registry settings I might need to change?

Any help anyone can give will be much appreciated,

Thanks,

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top