The settings are stored in C:\Users\[YOUR USERNAME]\AppData\Local\CCP\EVE\ and there in a folder that is named after the installation path of your EVE client (separate for Tranquility and Singularity, and other test servers). Inside the folder named after the installation path, you find more folders. The one called “settings_xyz” is/are the folders that you need to save. And put back into the same path (potentially slightly different name of the installation path folder) once you have installed EVE on the new hard drive.
You should also store the settings folder(s) regularly into a zip/7z/whatever archive or a cloud backup. On my previous PC, EVE crashed my entire PC on a regular basis and wiped all the settings for certain accounts/characters. After I had to re-setup the settings a couple of times I learned my lesson and stored them regularly in an archive to just copy them back in case they were wiped again.