After a recent Windows 10 Refresh, I found myself with most of my data missing from my installation – a bit of a surprise, having done Windows refreshes before and seeing that I selected the option to “keep all my data”. Ah well…
However, Windows was kind enough to preserve much of my previous configuration in an folder called Windows.old. As such, I could at least go back to some of the system data that I needed. Thank you, Windows
Before moving on with major re-installation work, I thought it would be wise to preserve the Windows.old folder on an external drive and make some room on my main SSD. I thought it’s just a simple matter of dragging the folder over – but that was not the case. When I tried, only perhaps 1GB of the total 30GB the folder contained was copied over.
What’s going on here? Why is this happening? My user name is exactly the same as before, why can I not create an exact replica of the whole folder somewhere else?
After some Googling, I found out that this is is caused by the fact that after the refresh, my new user has a different SSID than I had before. This cryptic abbreviation is a “Service Set Identifier”, and most of us have come across this concept when dealing with wireless networks. SSIDs appear to be present in many other areas of dealing with computers and devices, including user names.
It’s much like an internal numbering system, so that every “thing” or “service” or “device” can be uniquely identified in the vicinity. Although I was still “versluis” on both my old and my new account, if the SSID doesn’t match between accounts, Windows would not allow me access.
Linux systems have a similar “beyond user name” implemented security feature called SELinux. While I was familiar with the concept I hadn never heard of this being part of Windows. Guess you learn something new every day!
Thankfully, there’s a command with which we can take control of files that belong to another user, no matter what the SSID is. It’s called “takeown”, available with some cryptic parameters from an elevated Windows prompt. To open one, hit Windows + X and up comes the following menu at the bottom left:
Select Windows PowerShell (Admin) and a command line tool comes up, with administrator privileges. Now we can use the takeown command to transfer privileges of our desired folder to the administrator’s group (which my current user is part of):
takeown /F "C:\Windows.old" /A /R /D Y
Once Windows is done spitting out all kinds of messages, I was able to copy the folder to another drive, and delete the original one to make some room.
Thanks to David Postill for his explanations.