Listing folders in a network shared/mapped folder

Posted on 2004-10-27
Last Modified: 2010-05-02
I am creating an ASP page that will dynamically link to all the documents on a network share/mapped folder.  I am using VBScript as my language of choice.  I have been unsuccessful using FSO and WScript.  I used the code below to try and list my mapped drives with no success:

Set WshNetwork = CreateObject("WScript.Network")
Set Drives = WshNetwork.EnumNetworkDrives


For i = 0 to Drives.Count - 1 Step 2
      Response.Write(Drives(i) & "<br>")

It gives me a Count of 0.  I just need to be able to access the folder, so I don't really care which method I use.  Thanks for any help you may be able to provide.


PS.  The folder location of the documents is not on the web server.  This is an urgent request as others are dependent on this today.
Question by:psampsn
    LVL 26

    Expert Comment

    The IUSR_XXX doesn't have privilege to see your local network.

    1. create a dll and put on dcom+ and run as specific user
    2. try to add the above user into administrators group (just for testing , not recommended to do so)

    Author Comment

    Thanks for the help.  If I creat a .dll file won't I have to push it to every user?  I am hoping to create a page that is seemless to the user.
    LVL 14

    Accepted Solution

    Hi psampsn
    u can make use of the code in the following link to create ur specified dll



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    845 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now