Scott Hanselman

Refresh Your PC in Windows, AppData, and my missing Minecraft worlds

January 08, 2015 Comment on this post [32] Posted in Win8
Sponsored By

I thought I lost everything today. Well, not really, I have a very regular Backup Strategy (stop reading this blog post NOW and back your stuff up!) so I could get stuff back if I really needed to.

But a laptop died today. It just wouldn't start up and I had to run "Refresh my PC," a very cool feature of Windows that basically mostly reinstalls Windows without reinstalling. It promises not to lose your files. And it's (99%) true, because when I got Windows back up later my Documents and Desktop were just as I left them, untouched by the this major operation.

Refresh your PC - Windows 8.1

Fortunately I used Boxstarter, Chocolately, and a list of the programs I have installed as a Gist and was able to get my Windows machine with all my desktop programs back up and running in a few hours. All my files were backed up to the cloud and every file was where I left it.

Except the most important ones. ;)

I launched Minecraft, and saw this. And almost died.

My minecraft worlds are missing!

Where's my Minecraft save games/worlds?

I thought Windows promised to not change my files!? Well, sadly Minecraft doesn't save worlds in "My Documents\Minecraft," where it should. It puts them instead in c:\Users\YOURNAME\AppData\Roaming\.minecraft\saves which is basically like a temp folder of sorts for config data.

Fortunately after my initial freak out, even these files aren't lost, they are in C:\Windows.old\users\YOURNAME\AppData\Roaming\.minecraft\saves along with all your other AppData stuff including the npm-cache, .emacs.d, and other config data you might want.

Move them back, and you're (I'm) all set!

To the (Minecraft) Cloud!

Whew.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
January 08, 2015 12:07
Where on earth do you find time to play minecraft? =)
January 08, 2015 12:44
Well done Scott!
January 08, 2015 13:07
I'm wondering why so few games use the %HOMEPATH%\Saved Games directory...?
January 08, 2015 15:16
Isn't CSIDL_APPDATA or FOLDERID_RoamingAppDat the right place for "common repository for application-specific data" ?
January 08, 2015 15:31
I had the opportunity to test my backup a few days ago. I've got a Mac which of course does regular Time Machine backups. But I also have everything backed up to the cloud - even the install media for my applications are backed up to cloud.

Mac was misbehaving and since I was free, I went ahead and reformatted the drive and reinstalled Yosemite from scratch (previously had Lion --> Maverick--> Yosemite).
Once done, it took about two hours for my 46GB backup to come down from the cloud, after which I reinstalled the apps from the media just restored, and then took a fresh Time Machine backup.

Pretty happy with this, overall, I think this was faster than restoring from Time Machine because restoring it would trigger a full resync of the cloud backup which would probably take eight to twelve hours..
January 08, 2015 15:32
Minecraft is written in java. Surely it was a developer decision to store the files in AppData/Roaming as opposed to MyDocuments/Minecraft?

Bit tough on Microsoft/Windows to blame them for this problem.
January 08, 2015 15:55
AppData\Roaming is for 'temp' data?

According to http://windows.microsoft.com/en-gb/windows-8/what-appdata-folder:

Roaming. This folder (%appdata%) contains data that can move with your user profile from PC to PC – like when you're on a domain – because this data has the ability to sync with a server. For example, if you sign in to a different PC on a domain, your web browser favourites or bookmarks will be available.

I don't think browser favourites or bookmarks are 'temp' data.
January 08, 2015 17:54
Personally, I hate it when programs store their settings in My Documents. If it's not a document that I want to browse to and directly open up it has no place in My Documents.
January 08, 2015 17:54
Heh, that's a nice set of logic gates you built there, by the way.
January 08, 2015 18:15
Windows even ships with a 'Saved Games' folder inside the user folder, but there are almost no games that use it.

My guess is that game developers don't want to place save games in a different location than on older versions of Windows.

But I hope they change mind at some point because I am getting a huge amount of different game publisher folders in side MY 'My Documents' folder.
January 08, 2015 18:57
First of all, kudos to playing Minecraft! Secondly, what exactly is it you are building there? I am trying to figure out what that is for/doing? Thanks! -D
January 08, 2015 20:36
As Scott have showed in a demo, that is an Azure datacenter on minecraft :)
January 08, 2015 20:38
@Rik Hemsley If only the roaming folder was that simple, I would advise against saving anything to it other than temp data. Remember this folder is essentially downloaded from the server at log on and synced back at log off. Much better to save to the users actual data folders documents, pictures.... These are usually redirected and save directly back to the server.

I find software issues regularly on domains when they save to this directory, its something I think developers miss because they don't tend to use different computers on a domain.

Reasons I know of not to save in roaming are:
  • Mandatory profiles - On a domain if your administrator is strict or wants to keep profiles lightweight they may give you a profile that can't be modified (.man extension rather than .dat) this means when your profile would normally sync to the server at logoff nothing happens. Your roaming folder is not updated on the server and any registry changes are lost too. Next time you log on you will discover you have lost the files.
  • No log off or sync errors - The roaming folder on the server is updated at logoff from the local computer. If your computer crashes or the sync to the server fails due to network issues you have potentially lost your files. Depending on group policy settings even logging back on to the same machine may result in a new profile download from the server.
  • Dual log on - Log onto two computers (A and B), each will download a copy of the roaming profile. Save some files into roaming on computer A and log off now do the same on B. Pretty sure you will find your roaming folder on the server is the one from computer B and all files saved on A are gone.


  • These also apply to (not so) click once apps the bain of my life with mandatory profiles and isolated storage.

    January 08, 2015 20:54

    including the npm-cache, .emacs.d, and other config data you might want


    .emacs.d??? I am looking forward to your blog post on your emacs configuration. :)
    January 08, 2015 21:06
    Is it your Surface Pro 3 that "died" ?
    January 08, 2015 21:19
    I think we now need 'The real and complete story' on where applications are supposed to store data, according to Microsoft. LOL
    January 08, 2015 21:22
    Once I realized my minecraft saves weren't getting backed up I made a library called GameStuff and added my saves folder to that so File History would see it.
    January 09, 2015 1:09
    If it's saved with a save dialog, it should default to My Documents. If the user doesn't get to pick the save location at save time, it should be saved in AppData. Minecraft has it right. My Documents should be curated by the user. Games and other applications using that to persist state is a terrible place we've found ourselves.
    mo
    January 09, 2015 1:25
    @mo It isn't great but saving to appdata is worse as it can result in unexpected loss of data for the user. Probably the best approach is saving to the cloud now.
    January 09, 2015 3:22
    Bravo! Great to see you practice what you preach. Saved you a lot of pain. Good job!
    January 09, 2015 9:27
    Not as bad as some apps that try to save back to Program Files, or worse yet, directly to C:\.
    Joe
    January 09, 2015 19:06
    My wife just upgraded Windows from 7 to 8 and looks like she had a similar problem.

    She said programs like Chrome that use to save its data to AppData folder (in this case even the .exe) needed to be installed again.

    Somewhat frustrating.
    January 09, 2015 22:24
    Thank You!!!! I Actually just had this problem after running a "Refresh My PC." Now my Minecraft Worlds are up and Running!
    January 11, 2015 3:49
    Yeah, apps should not be sticking stuff like that in My Documents. It's the reason My Documents is such a ghetto. If "Refresh My PC" doesn't preserve AppData, then it is basically lying in its description because almost every app I know of stores stuff there that users will not want to lose.
    January 12, 2015 19:02
    Impressive Minecraft world you have there; you must have spent a lot of time on it to get logic boards and Azure components. I can't even play that game without getting a headache.
    January 13, 2015 20:44
    @Pete "Probably the best approach is saving to the cloud now."

    Which is why I mklink any folder in %appdata% that I care about into a sync folder in Dropbox. Basically, *I* want to make the decisions about what files get replicated where and which folder is referenced for what configuration. The corporate domain that I have to interact with routinely screws it up and, as you say, loses configurations and data. Granted that linking the files out to cloud storage is less than ideal at least I can always go to Dropbox and pull up an older version of the file or un-delete it from there if need be.

    I get that Microsoft is trying to make things easier for the uninitiated but so many programs are hiding important files down in Windows' rabbit holes. When everything is obscured and walled off from the user life becomes very difficult all the way around if one single part of the system doesn't act the way you need it to. If I can't select where something gets saved and I care about it at all then I will take whatever steps necessary to find it and mklink it to somewhere that will give me control over it's disposition.
    January 13, 2015 23:04
    Lots of blaming-MS going on in this thread, when the real problem is the developers. This seems to happen quite a lot.

    The location of saves has been a standard for at least a decade now. If developers aren't keeping their trash updated, it isn't the responsibility of the operating system to do it for them.

    Poor dev practices and a failure to keep up with current standards are the primary reasons everyone wants to move to the Apple "We broke compatibility with your app? Suck it." OS model.
    January 14, 2015 2:10
    "The location of saves has been a standard for at least a decade now."

    Which is what? %AppData%?

    So, Minecraft does it correctly, then? LOL
    January 28, 2015 21:40
    What are you attempting to do in that MineCraft World?
    March 08, 2015 23:06
    One thing that you have to keep in mind with windows.old is that it will delete the stuff in there by itself bit by bit. Especially if it notices that the disk is getting full. It starts by deleting the Windows, ProgramData folders. So don't forget to move the stuff out of there after a refresh or reinstall.
    March 20, 2015 12:51
    Thanks for the article, I thought I had lost all my saves. I didn't know if I was going to start over or just quit Minecraft.
    March 31, 2015 19:40
    Yeah, well, if you're going to get anything from that backup folder windows.old you need to do it ASAP after doing a PC Refresh.

    The folder is removed automatically by a background scheduled "Windows cleanup task".

    After refreshing someone else's screwed up laptop, I watched as that folder was magically deleted before even 24 hrs had passed since starting the refresh, and no way to stop it from getting deleted.

    Fortunately for me though, I had made an entire copy of the user's profile "C:\Users\(name)" before doing the refresh, so to me this is not a huge problem, but still, Microsoft does not give you much time at all to recover anything in there.

    Comments are closed.

    Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.