The script is calling xp_fixeddrives which does not support mounted volumes. The disk space can be easily retrieved by either a Powershell query or a WMI query instead of ole automation procedures.
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉