P.S: Back up your registry before doing this... Do so by opening regedit (mentionned below) and clicking File > Export > Save. That will save you in case of failiure
Open regedit (Start > Run > "regedit"). Then find "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion". Now look in the right pane. Change "ProgramFilesDir", "ProgramFilesPath", "ProgramW6432Dir" and "ProgramFilesDir (x86)". If your secondary drive letter is D:\, then change them to "D:\Program Files", "D:\Program Files", "D:\Program Files" and "D:\Program Files (x86)", in that order that I just mentionned. You should be good to go from here.