Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 08-11-2007, 11:00 AM
Peter Ritchie [C# MVP]
Newsgroup Contributor
 
Posts: n/a
Delete ntuser.dat for non-existent user

I deleted a user in Local Users and Groups but forgot to delete the users'
profile via the System control panel applet. Deleting the user did not
remove the users NTUSER.dat file and when I try to delete it (while logged in
as a different user with Admin rights) it always complains the file is in use.

What's the best way to delete these files? (NTUSER.dat.log as well)?

Thanks -- Peter
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 08-11-2007, 11:00 AM
  #2 (permalink)  
Old 08-11-2007, 11:20 AM
Doug Knox - [MS-MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Delete ntuser.dat for non-existent user

Take ownership of that folder. See Help and Support and search for "take
ownership"

HOW TO: Take Ownership of a File or Folder in Windows XP
http://support.microsoft.com/?id=308421

If that doesn't work, boot into Safe Mode and use the built-in Administrator
account.

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart
Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Peter Ritchie [C# MVP]" <PRSoCo@newsgroups.nospam> wrote in message
news:B1C30B57-496C-469F-B403-B832F40178E4@microsoft.com...
>I deleted a user in Local Users and Groups but forgot to delete the users'
> profile via the System control panel applet. Deleting the user did not
> remove the users NTUSER.dat file and when I try to delete it (while logged
> in
> as a different user with Admin rights) it always complains the file is in
> use.
>
> What's the best way to delete these files? (NTUSER.dat.log as well)?
>
> Thanks -- Peter
> --
> Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> http://www.peterRitchie.com/blog/
> Microsoft MVP, Visual Developer - Visual C#


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 08-11-2007, 01:30 PM
Robert Moir
Newsgroup Contributor
 
Posts: n/a
Re: Delete ntuser.dat for non-existent user


"Peter Ritchie [C# MVP]" <PRSoCo@newsgroups.nospam> wrote in message
news:B1C30B57-496C-469F-B403-B832F40178E4@microsoft.com...
>I deleted a user in Local Users and Groups but forgot to delete the users'
> profile via the System control panel applet. Deleting the user did not
> remove the users NTUSER.dat file and when I try to delete it (while logged
> in
> as a different user with Admin rights) it always complains the file is in
> use.
>
> What's the best way to delete these files? (NTUSER.dat.log as well)?


Rename the file.
It then will not be in use the next time you boot

(...well it works for me)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 08-11-2007, 04:50 PM
Newbie Coder
Newsgroup Contributor
 
Posts: n/a
Re: Delete ntuser.dat for non-existent user

Peter,

As you are a C# MVP I would suggest you use the MoveFileEx API with the:

Const MOVEFILE_DELAY_UNTIL_REBOOT = &H4 (VB) constant

For the first paprameter in the API pass the file path to the dat file & then
use NULL (to delete) for the second parameter

Run with F5 in Visual Studio & reboot when ready

Simple


--
Newbie Coder
(It's just a name)



"Peter Ritchie [C# MVP]" <PRSoCo@newsgroups.nospam> wrote in message
news:B1C30B57-496C-469F-B403-B832F40178E4@microsoft.com...
> I deleted a user in Local Users and Groups but forgot to delete the users'
> profile via the System control panel applet. Deleting the user did not
> remove the users NTUSER.dat file and when I try to delete it (while logged in
> as a different user with Admin rights) it always complains the file is in use.
>
> What's the best way to delete these files? (NTUSER.dat.log as well)?
>
> Thanks -- Peter
> --
> Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> http://www.peterRitchie.com/blog/
> Microsoft MVP, Visual Developer - Visual C#



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete listing for non-existent backup Walter Blanchard Windows Vista 4 06-28-2007 10:40 AM
Can I delete ASP.NET from user accounts? Ed in Seattle Windows XP 1 06-27-2007 04:30 PM
c:\DOCUME~\USER\NTUSER.DAT.LOG error Phyllis Windows XP 1 03-12-2007 12:00 AM
Ntuser.dat/User Account Profle Recovery dolphiness1976 Windows XP 4 02-07-2007 09:45 PM
XP tries to boot with a non-existent user when auto login is enabled. I Throw Thumbers Windows XP 2 01-04-2007 05:41 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 10:10 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0