List of Network Drives

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankajit09
    Contributor
    • Dec 2006
    • 296

    List of Network Drives

    How to get the list of all the network drives present in a machine ?
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    if you can get that information from the command line, PHP can do it.

    see shell_exec()



    Dan

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, pankajit.

      That's a tricky one because you can technically mount a drive anywhere in Linux (dunno if it's the same under Windows, but you haven't specified which OS your server is running).

      You might try parsing the output of the `df` command (via shell_exec() as Dan mentioned above).

      I will go ahead and move this thread to the Linux forum for now to see if they can help you out.

      Comment

      • pankajit09
        Contributor
        • Dec 2006
        • 296

        #4
        Originally posted by pbmods
        Heya, pankajit.

        That's a tricky one because you can technically mount a drive anywhere in Linux (dunno if it's the same under Windows, but you haven't specified which OS your server is running).

        You might try parsing the output of the `df` command (via shell_exec() as Dan mentioned above).

        I will go ahead and move this thread to the Linux forum for now to see if they can help you out.

        My OS is Windows XP Professional.

        Comment

        • Nepomuk
          Recognized Expert Specialist
          • Aug 2007
          • 3111

          #5
          In that case, the Windows Forum is the place for this to be. I'm moving it there.

          Greetings,
          Nepomuk (Moderator)

          Comment

          • jg007
            Contributor
            • Mar 2008
            • 283

            #6
            couple of possible ways

            either

            ' net use '

            or using VB script , I will try to post the code for the vbscript if you need it but it may take me some time before I get a chance to work it out.

            also your question is a bit unclear so it will help if you can explain what you mean by network drives , do you mean network shares or open connections to another w/s / server?

            Comment

            • pankajit09
              Contributor
              • Dec 2006
              • 296

              #7
              Originally posted by jg007
              couple of possible ways

              either

              ' net use '

              or using VB script , I will try to post the code for the vbscript if you need it but it may take me some time before I get a chance to work it out.

              also your question is a bit unclear so it will help if you can explain what you mean by network drives , do you mean network shares or open connections to another w/s / server?

              Thanks.

              I mean Network Shares.

              Comment

              • pankajit09
                Contributor
                • Dec 2006
                • 296

                #8
                Originally posted by Nepomuk
                In that case, the Windows Forum is the place for this to be. I'm moving it there.

                Greetings,
                Nepomuk (Moderator)

                Whats the link for this page in that forum ?

                Comment

                • Nepomuk
                  Recognized Expert Specialist
                  • Aug 2007
                  • 3111

                  #9
                  Originally posted by pankajit09
                  Whats the link for this page in that forum ?
                  You're already here - the link stays the same, but you'll find it under "Forums -> System Administration -> Windows" now, if you want to direct to it.

                  Greetings,
                  Nepomuk

                  Comment

                  • jg007
                    Contributor
                    • Mar 2008
                    • 283

                    #10
                    net use will show any current shares you have to another PC and you could probably find some way of parsing it using the for command.

                    again 'net share' will show any shares that your computer has, also there is a registry key that holds all the information on any shares -

                    " HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices\lanmans erver\Shares "

                    if i have a chance I will try to work out some vbscript to enumerate the drives in the computer probably through WMI and then output any that are shares or something similar

                    also just to confirm are you looking to output the shares provided by your computer or the links that you have open to another computer?

                    Comment

                    Working...