Problem with Sharename property using FSO
I have a H: drive map to \\MAINPC\TEST$
Each time I run my code, I received the following error message
Microsoft VBScript runtime (0x800A0044)
Device unavailable
What is wrong with my code ???
<%
dim fso, drv
set fso=createobject("Scripting.FileSystemObject")
set drv = fso.GetDrive("H:\")
if drv.drivetype = 3 then
response.write drv.sharename & "<br>"
end if
%>
I tried driveletter and also path properties instead of sharename and it works fine, is there something special with the sharename property.
Thanks
|