The information is stored in the registry somewhere in
HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags
This key contains many subkeys, by default up to 400. These are the saved folder customizations.
One of these subkeys is your D drive. The difficulty now is to find out which one.
I'd suggest get
RegShot (tiny utility that doesn't require installation). Start Regshot and open an Explorer window to your D drive. In Regshot click "1st shot", when finished change some aspects of the D: explorer window, change window size or position, switch to tile or list view..., close the window, back in Regshot click "2nd shot" and when finished "compare". This opens a text file which under "values modified" contains several references to a key like
HKEY_USERS\S-1-5-21-1390067357-113008714-854265398-500\Software\Microsoft\Windows\ShellNoRoam\Bags\36\Shell\WinPos800x600(1).right: 0x00000323
The number after ..\Bags\ in this case 36 is what we are looking for.
Now open regedit to
HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags
find subkey 36 and open its subkey "shell"
In the right pane there should be a string value named "Folder Type" which has the value "Music". Doubleclick on "Folder Type" and change the value to "Documents" (everything without quotes). Close regedit.
Maybe there is a more simple solution but that's how I would do it. Hope it works.