Scott Hanselman

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

January 8, '15 Comments [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
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Thursday, 08 January 2015 08:07:21 UTC
Where on earth do you find time to play minecraft? =)
avidenic
Thursday, 08 January 2015 08:44:38 UTC
Well done Scott!
Thursday, 08 January 2015 09:07:01 UTC
I'm wondering why so few games use the %HOMEPATH%\Saved Games directory...?
Thursday, 08 January 2015 11:16:43 UTC
Isn't CSIDL_APPDATA or FOLDERID_RoamingAppDat the right place for "common repository for application-specific data" ?
Mike Hudgell
Thursday, 08 January 2015 11:31:00 UTC
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..
sahir Siddiqui
Thursday, 08 January 2015 11:32:03 UTC
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.
Joe King
Thursday, 08 January 2015 11:55:51 UTC
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.
Rik Hemsley
Thursday, 08 January 2015 13:54:32 UTC
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.
Chris
Thursday, 08 January 2015 13:54:39 UTC
Heh, that's a nice set of logic gates you built there, by the way.
Mike Johnson
Thursday, 08 January 2015 14:15:10 UTC
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.
Thomas Skydahl Sørensen
Thursday, 08 January 2015 14:57:05 UTC
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
DerekM
Thursday, 08 January 2015 16:36:14 UTC
As Scott have showed in a demo, that is an Azure datacenter on minecraft :)
Thursday, 08 January 2015 16:38:59 UTC
@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.

    Pete
    Thursday, 08 January 2015 16:54:39 UTC

    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. :)
    Gabe
    Thursday, 08 January 2015 17:06:11 UTC
    Is it your Surface Pro 3 that "died" ?
    Thursday, 08 January 2015 17:19:07 UTC
    I think we now need 'The real and complete story' on where applications are supposed to store data, according to Microsoft. LOL
    Sergey Nosov
    Thursday, 08 January 2015 17:22:42 UTC
    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.
    Dan Tower
    Thursday, 08 January 2015 21:09:47 UTC
    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
    Thursday, 08 January 2015 21:25:43 UTC
    @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.
    Pete
    Thursday, 08 January 2015 23:22:18 UTC
    Bravo! Great to see you practice what you preach. Saved you a lot of pain. Good job!
    Dave
    Friday, 09 January 2015 05:27:57 UTC
    Not as bad as some apps that try to save back to Program Files, or worse yet, directly to C:\.
    Friday, 09 January 2015 15:06:51 UTC
    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.
    Vitor Canova
    Friday, 09 January 2015 18:24:38 UTC
    Thank You!!!! I Actually just had this problem after running a "Refresh My PC." Now my Minecraft Worlds are up and Running!
    Saturday, 10 January 2015 23:49:44 UTC
    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.
    Monday, 12 January 2015 15:02:24 UTC
    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.
    John Dunagan
    Tuesday, 13 January 2015 16:44:55 UTC
    @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.
    Grady
    Tuesday, 13 January 2015 19:04:06 UTC
    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.
    Anon
    Tuesday, 13 January 2015 22:10:07 UTC
    "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
    Sergey Nosov
    Wednesday, 28 January 2015 17:40:39 UTC
    What are you attempting to do in that MineCraft World?
    Daryl
    Sunday, 08 March 2015 19:06:43 UTC
    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.
    Rutix
    Friday, 20 March 2015 08:51:26 UTC
    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.
    anthony
    Tuesday, 31 March 2015 15:40:26 UTC
    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.
    Dale Mahalko
    Comments are closed.

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