Windows – How to migrate Google Chrome profile (extensions, cookies, etc.) to another Windows installation

google-chromemigrationwindows

This question has been asked a million times on the web (example) but I have found no solutions that actually work, so I'm asking it again. Please actually read the entire question before posting.

The question is pretty simple. I have installed a second copy of Windows on the same machine (same OS — Windows 8.1 — with the same product key and all) and I'm trying to migrate everything to it.
However, when I try to make the new installation of Chrome use my old profile, it wipes some of the data (e.g. all of my extensions), claiming they are corrupt, while preserving others (e.g. bookmarks).
Needless to say, the profile isn't actually corrupt; it works just fine in my old Windows installation. And yes, I'm using the same version of Chrome (version 47 x64) and all.

For the life of me, I can't figure out how or why it does this. I've even looked at the Chromium source code and can't even figure out where Chrome makes the decision to reset the profile, and what it bases this decision on. I've tried using Process Monitor to figure out how it detects anything is going on, and I haven't found anything.

Can someone explain to me what is going on and how I can continue to use my old profile as-is, intact in my new Windows installation?

Note: Due to the frustratingly low amount of information on this issue and high number of non-working "solutions" on this site and elsewhere on the web, please, don't make random guesses. Only post an answer if you have reproduced the problem and can reproduce a working solution to it, or alternatively, if you can point to the exact line causing this in the Chromium source code. Thanks.

Best Answer

A partial answer from myself:

It seems that this has to do with the "Secure Preferences" feature, and the profile is encrypted based on the Machine SID in Windows. I managed to change my machine SID to the old one, and now my profile loads and my extensions are not deleted. However, my cookies still don't seem to work, so if someone knows why, please explain.

Relevant code bits are in pref_hash_store_impl.cc as of this writing (GenerateDeviceId, which calls GetDeterministicMachineSpecificId, which calls LookupAccountNameW).

Related Question