Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting Mapped Network Drives

Status
Not open for further replies.

dexeloper

Programmer
Oct 26, 2004
162
GB
Can anyone say why this code only returns internal drives and not any mapped network drives.

set objFSO = server.createobject("scripting.filesystemobject")
set objDrives = objFSO.drives
for each drive in objDrives
strDrives = strDrives & drive.driveletter next
response.write(strDrives)
 
because mapped drives are usually only mapped when a user logs on. As there is normally no one logged on at the server console, therefore no mapped drives.



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
This is running on my machine - and I'm signed on.
 
Would it because a mapped drive is not physically on your machine? FSO can only see what is physical. Mapped drive links are just pointers to other locations on other machines (via network).




"I think there is a world market for maybe five computers."
--Thomas Watson, chairman of IBM, 1943

 
mapped drives will show up in FSO.Drives, the problem is accessibility, when you map a network drive you have to supply credentials, if you dont you'll be prompted to sign in, as in .. you set the map drive up as admin, but log in as a user, the user will be prompted for login info for that drive/machine respectively.

when IIS/FSO attempt to access the drive it's as the Everyone/IUSR_WebServerName accounts, and if those have not been specified as allowable on the other machine via share permissions, the drive will not be connectable via FSO.

i've had problems with it in the past as well, normally i'll just add IUSR_WebServer to the share permissions on the shared side and modify the mapped credentials to reflect that of iusr.



[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
more specific information straight from MS link

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top