Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2003, 08:12 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old September 2nd, 2004, 09:23 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry I do not have an answer but I do have more questions....

I can get filescriptobject to work perfectly from my pc which is localhost with IIS on it. I can get pathname etc from my local hard drive and I can access my share area. I can also access company wide shares.

When I move the asp code with the filesystemobject in it to the Development Web server, I can still access my local and my share but I can no longer get at the company wide shares.

I feel it has to be something with setup / security. One page posed the question of "SymLink"?

Good Luck

bill

 
Old September 2nd, 2004, 10:27 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The answer from our web server specialists was that the share would have to be mapped to the server inorder to fix my problem. Because of security we can not do that. I'll have to work with the users so that that when they pick a file with the file button I will build a fixed path for them.

Now the answer to your question.

If drivetype = 3 use ShareName else use VolumeName.

bill






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem about "IsCrossPagePostBack" Property. condescendent ASP.NET 2.0 Professional 0 June 12th, 2007 09:26 PM
Property initialization problem VoodooCreator Pro Visual Basic 2005 1 June 29th, 2006 07:56 PM
splash form property changes problem Derek_05 Access VBA 1 January 17th, 2006 10:54 AM
Problem when changing the Location property armandoa Crystal Reports 0 October 8th, 2004 06:21 PM
FSO Logfile Problem acdsky Classic ASP Basics 2 April 11th, 2004 10:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.