Hi,

Two days ago I was doing a defrag on my hard disk, but a power failure screwed the process. After the power failure the computer won't boot. It says something like: "Error, hal.dll is missing or corrupted". After that I went like crazy because the documents there are really important to me, so I tryed many things: boot in safe mode, overwriting that file... but none of them worked.

After that, I reintalled the OS and I have tryed to retrieve my documents from the previous installation but when I try to access the "My Documents" folder, it says: "Unable to access folder. Access Denied". Can somebody help me retrieve that information please?

Dani AI

Generated

Quick expert summary for : an interrupted defrag commonly damages system files (hal.dll symptoms are typical). A repair/in‑place reinstall of XP often restores HAL and lets the old data remain intact, so a full format is not required in every reinstall — was on the right track about a less‑destructive fix and ’s comment that “reinstall always formats” is not strictly true. See Microsoft’s guidance on in‑place/repair installs. ()

Why “Access denied” shows up: the old files usually still exist but NTFS ownership and ACLs belong to the previous install’s user SIDs, so the new Windows blocks access. First-line steps are non-destructive: don’t write to the disk; check whether the old profile folders or a Windows.old/“Documents and Settings” tree still exist; then try to regain ownership via the Security tab (disable Simple File Sharing on XP Pro or use Safe Mode / the Security Configuration tool on XP Home) and reapply permissions. These are standard Microsoft procedures. (ftp.zx.net.nz)

Practical, safe workflow (in order):

  1. Stop using that Windows partition immediately.
  2. If possible, attach the drive to another PC (or boot the PC from a Live CD / BartPE / WinPE) and copy the visible user folders off to an external disk.
  3. If remaining in Windows, change ownership and permissions (GUI) or grant Administrators full control from a command prompt:
cacls "D:\Documents and Settings\OldUser" /T /E /C /G Administrators:F

Use this only after making a backup copy of any readable files; recursive ACL edits are blunt and can be reversed only with care.

If files are missing or the disk is showing errors, image the drive first and work from the image. Prefer ddrescue for failing media (it resumes and preserves read progress); example commands:

sudo ddrescue /dev/sdX /path/to/external/image.dd /path/to/logfile

or, for a straight image:

sudo dd if=/dev/sdX of=/path/to/external/image.dd bs=4M conv=noerror,sync

Run recovery tools (on the image, not the original) or consult a professional lab for critical data. Note: files that were encrypted with EFS cannot be decrypted without the original user certificate or a domain recovery agent — if EFS was used and the certificate was lost during reinstall, those files may be unrecoverable. (gnu.org)

Recommended priority: try the ownership/permissions route first (least invasive), copy any accessible files off, then image the disk before attempting deeper recovery or repair.

Recommended Answers

All 2 Replies

Did you do a complete new install (including a reformat of the partition)? If so, it will be difficult to recover much of the data. I assume that your data is still available because you get the Access Denied error.

To solve the Access Denied problem, there is an article on Microsoft's website about this.

Tip for next time (not that I hope it will happen to you again ;) ), there is an easy fix to your hal.dll error which probably would have saved you a lot of trouble.

I don't think Windows (any version) let's you re-install without formatting the current partition you want it on so I think you just might be screwed as far as your data goes. Sorry to hear that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.