Jump to content

A surprising way to lose your files on Windows


Wunderbar98

Recommended Posts

A surprising way to lose your files on Windows

366 points by raffraffraff 14 days ago | 245 comments

This sad sequence of events just happened to a relative, and they're distraught. I haven't used Windows for ~15 years but since it was my area of expertise back then I still get lumbered with these problems. This one really surprised me though.

They logged into Windows 7 (I know, upgrade...) and it looked like their files were missing. In a panic, they opened Explorer and searched for their files. They turned up in the search. They just didn't show up in the usual "My Documents", "My Pictures", "My Videos" paths.

They decided to move the files "to the correct place". And then they shut the computer down.

The next time they started it, the same thing happened. This is where I got called in, because this time, the files didn't show up in a search. I told them to turn the computer off immediately and drop it with me.

Can you guess what happened? Well, check this out:

- Windows couldn't use their user profile because it was corrupted

- So it created a temporary profile in "C:\Users\TEMP". (This wasn't obvious to the user because Explorer hides the 'detail' of the file path and simply shows the username)

- Unwittingly, when they moved the precious files to the "correct" place, they were putting them into a temporary profile.

- On shutdown, Windows promptly deleted the temporary profile, so "C:\Users\TEMP" got wiped along with all of the files.

I was frankly astonished that Windows would drop them into a temporary user profile without dire warnings about its transience. Anyway, now I have to try to recover not only the files, but the directory structures. I'm not even sure it's possible... :(

https://news.ycombinator.com/item?id=33047150
Link to comment
Share on other sites


Hi @Tripredacus, good to know there's been improvment. Not sure a corrupt user profile was ever experienced personally in Windows 2000 or XP. If so, then it was either fixed without drama or a new one created.

Unix-based, to my knowledge, this wouldn't happen. No profile to corrupt, just flat files in the user's home directory (eg. /home/user_one). So the primary issue will be either file system problem (run 'fsck' to repair) or someone messed with files or permissions in the home directory (manually remedy as needed). If desired adding a new user from command line is as simple as 'adduser' and copying over any favourite configuration files.

Found these fixes for various Windows OS, can't vouch for them, maybe they help someone.

Corrupt User Profile: Fix for Windows 10, 11, XP, Vista, 7, 8:
https://neosmart.net/wiki/corrupt-user-profile/
Link to comment
Share on other sites

thats why i never store anything in user profile folders

rather 2nd partition and 2nd hard drive :P

in fact this is why i hate the approach Linux has, everything is "singled out" to user profile folders and disk in file managers

Edited by vinifera
Link to comment
Share on other sites

My preferences are similar, only in Windows C:\DOCS\ is created for files and in GNU/Linux encrypted USB sticks (triplicate backup) instead of an attached drive. This way a power surge, for example, isn't going to wipe out important files.

Unless i misunderstand, GNU/Linux separates each user's files for a reason, security. Personally i don't keep many files in /home/user/, mostly configurations.

Using your second hard drive example, the easiest way to replicate your desired Windows behaviour in GNU/Linux is to create a shared directory that is accessible to all, takes seconds to set up, example:

mkdir /media/sdb1/shared_files
chmod -R 777 /media/sdb1/shared_files

All GNU/Linux users and multi-boot OS will then have access to 'shared_files' sub-directories. Choose whatever level of security you desire, 666 may be best (read/write for all, no execute).

If a system multi-boots Windows and GNU/Linux set up a shared FAT32 partition, for example, to share files between the different OS (no permissions recognized) or use a dedicated GNU/Linux filesystem if the intent is to hide files from Windows.

To me these are easy solutions to share files, get them out of a 'profile' (and abomination of 'My Documents') and avoid custom modification of each GNU/Linux /etc/fstab file.
Link to comment
Share on other sites

Reads like one of those random problems where at the end, nobody knows how they occurred in the first place. I've had bad luck with some other part of Windows going bad in the past, I only recall the one when audio didn't work anymore after an update and couldn't figure out what was wrong. I remember looking at known (to me) related registry entries, which looked fine. I think it was the update process rather than the update content. That was Win10, but I've had other strangeness with older Windows as well, including 7 and XP.

Never had a corrupt user profile though. I wonder about the message specific meaning, is it about loading NTUSER.DAT (user's registry, aka. HKEY_CURRENT_USER) or could be also something else? :dubbio:

On 10/18/2022 at 7:15 AM, Wunderbar98 said:

So the primary issue will be either file system problem (run 'fsck' to repair)

I've had a funny issue on non-desktop Linux, specifically my previous Android 4.4 installation on my smartphone. Anytime phone would be rebooted to recovery, fsck would find some file system errors on /data partition, which would be fixed only until you booted the system again. Then they would come back. But if I formatted the partition, boot the phone, go back to recovery, then they wouldn't appear anymore.

They also haven't appeared ever since I replaced stock Sony's flavor of Android 4.4 with community port of LineageOS 14.1. I thought about bad flash memory, this is something that is yet to be confirmed, I think I've never run full test, but I remember reading about some command line utility you find on Linuxes and toying with it, it can be told to test the device by writing data to each block and reading it back for verifying the correctness. Not sure if it's part of BusyBox, which I do have on Android, but it's possible to mount phone's partitions on desktop Linux when you plug the phone to computer via USB, you can even use dd and netcat together to transfer whole partition data on the block level over USB both ways! After enabling ADB TCP forwarding, that is and the sufficiently functional custom recovery on the phone is required, can't do much with locked-down default device.

Either way, If it's really a flash problem, it must be well disguised.

Link to comment
Share on other sites

17 hours ago, vinifera said:

thats why i never store anything in user profile folders

rather 2nd partition and 2nd hard drive :P

in fact this is why i hate the approach Linux has, everything is "singled out" to user profile folders and disk in file managers

That's what I do: I keep my operating system on one hard drive, and everything else on a separate hard drive.  That includes keeping documents in a Documents folder instead of in My Documents.  This makes it easier if I want to format and reinstall the operating system.  I also have a couple of USB adapters that allow me to access the various hard drive types without opening up the computer.  It simplifies things if the new hard drive is already formatted prior to installation.  While I have yet to have a corrupted profile with Windows 7 x64, I have had this occur with Windows XP x64.  The only real solution is to format and reinstall the operating system.

Link to comment
Share on other sites

2 hours ago, mshultz said:

While I have yet to have a corrupted profile with Windows 7 x64, I have had this occur with Windows XP x64.  The only real solution is to format and reinstall the operating system.

https://www.top-password.com/knowledge/enable-windows-administrator-account.html

XP is a little different: https://www.trishtech.com/2010/10/unhide-the-administrator-account-in-windows-xp/

Though maybe nuking everything and reinstalling gives a better sense of peace since maybe the incident also corrupted something else besides the profile. I personally have a feeling people often burn the entire house down to get rid of a small bug.

Link to comment
Share on other sites

One reason why I always use Pro editions (at least) so that if my profile were to get corrupted, I can boot into Safe Mode and have access to the Users and Groups cpl in MMC without having to enable Administrator.

Profile corruption was common in NT4, 2000 and XP inside of domains specifically because users would always be saving things in local profile folders even if considerations where made to have a User share. The corruption happens due to there being a large file size in the domain profile, and copy errors occur during synchronisation. However, having very large "for the time" user profiles (2 GB+ is where it becomes a problem) in local only (no domain) profiles can still cause issues with corruption. Those OSes also occasionally had issues with path length and also there was that mysterious "number of files in folder*" issue which did not match to Windows or file system limits which did not help.

The local profile corruption still occurs these days but not because of size or file counts in modern OS. Now it is usually caused by some program or virus behaving badly. The network desync in AD can still occur for those types of profiles however.

* This is some bug where some dirs became unresponsible/unusable when number of files in a single dir/subdir would number 1000+. The actual limits by the OS or filesystem (even FAT32) were well above where the problem occurred so it must have been something else. I never did figure it out. Sometimes would happen over 1000 files, sometimes over 3000 files.

Link to comment
Share on other sites

---
@Tripredacus wrote:
This is some bug where some dirs became unresponsible/unusable when number of files in a single dir/subdir would number 1000+.
---

Ha, ha, yes unresponsible and unresponsive MSFT.

I can confirm this issue goes back at least to Windows 98 SE with FAT32, recently encountered during a large data management project. It seems related to hard coded directories, like My Documents. Creating and working from C:\DOCS\, for example, fixed everything.

Problem handling 1000s of files in My Documents in Windows 98 SE:
https://msfn.org/board/topic/177106-running-vanilla-windows-98-in-2020-and-beyond/page/64/#comment-1219182

Exploring the issue:
https://msfn.org/board/topic/177106-running-vanilla-windows-98-in-2020-and-beyond/page/64/#comment-1219272

Fixed:
https://msfn.org/board/topic/177106-running-vanilla-windows-98-in-2020-and-beyond/page/65/#comment-1219323

Similar complaints:
https://msfn.org/board/topic/45565-mydocuments-opening-slow/
http://web.archive.org/web/20030121213054/http://the-it-mercenary.com/forums/Help/posts/8929.html
Link to comment
Share on other sites

On 10/21/2022 at 2:58 PM, UCyborg said:

 I personally have a feeling people often burn the entire house down to get rid of a small bug.

It's not your personal feeling, it is what most people actually do (formatting/reinstalling), I suspect because if you ask or search about a problem you have on the Internet (with the rare exception of MSFN and a few more "friendly" forums) the replies usually amount to these (please choose one ;)):

1) That cannot be fixed, format and reinstall
2) It would take less time to format and reinstall
3) You should format and reinstall
4) Why don't you format and reinstall?
5) I had that same problem, I formatted and reinstalled and it went away.

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...