I’ve been using bitcoin core on Windows 7 for ages, but now I’m moving to Windows 10. My data is stored on a different drive, like F:\abc\def\xyz\blocks\. But here’s the thing, the bitcoin.conf file in C:\program files\bitcoin only has comments. How does it know where the blockchain is? I want to keep using the same setup when I switch.
Bitcoin Core doesn’t read from Program Files. It actually gets its config from AppData/Local or Roaming, can’t remember which one. There’s a Bitcoin folder there with the bitcoin.conf file. When you switch, it should carry over unless you format your C drive.
When you start Bitcoin Core for the first time, it lets you choose the data directory if it can’t find it. This info is stored in the registry, check it out in regedit under Computer\HKEY_CURRENT_USER\Software\Bitcoin\Bitcoin-Qt. But honestly, you shouldn’t need to touch that if it’s set correctly.
That bitcoin.conf is just a starter file, check out the comments in it. You can launch bitcoin-qt with choosedatadir to pick your data folder. Also, if it can’t find the data directory, it’ll ask for it when you start up. Just make sure it’s looking in %appdata%/bitcoin first.