 | 
September 9th, 2008, 01:40 PM
| | Needs Regular Fix | | Join Date: Dec 2006
Posts: 261
| | List of Network Drives
How to get the list of all the network drives present in a machine ?
| 
September 14th, 2008, 06:14 PM
|  | Site Addict | | Join Date: Dec 2007 Location: US Age: 23
Posts: 658
| |
if you can get that information from the command line, PHP can do it.
see shell_exec()
Dan
| 
September 17th, 2008, 05:31 AM
|  | Site Moderator | | Join Date: Apr 2007 Location: Texas Age: 24
Posts: 5,306
| |
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.
| 
September 18th, 2008, 09:41 AM
| | Needs Regular Fix | | Join Date: Dec 2006
Posts: 261
| | Quote: |
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.
| 
September 18th, 2008, 10:03 AM
|  | Moderator | | Join Date: Aug 2007 Location: Germany Age: 21
Posts: 1,921
| |
In that case, the Windows Forum is the place for this to be. I'm moving it there.
Greetings,
Nepomuk (Moderator)
| 
September 18th, 2008, 05:40 PM
| | Familiar Sight | | Join Date: Mar 2008
Posts: 247
| |
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?
| 
September 19th, 2008, 09:27 AM
| | Needs Regular Fix | | Join Date: Dec 2006
Posts: 261
| | Quote: |
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.
| 
September 19th, 2008, 09:28 AM
| | Needs Regular Fix | | Join Date: Dec 2006
Posts: 261
| | Quote: |
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 ?
| 
September 19th, 2008, 09:56 AM
|  | Moderator | | Join Date: Aug 2007 Location: Germany Age: 21
Posts: 1,921
| | Quote: |
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
| 
September 19th, 2008, 05:16 PM
| | Familiar Sight | | Join Date: Mar 2008
Posts: 247
| |
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_MACHINE\SYSTEM\CurrentControlSet\Servic es\lanmanserver\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?
|  |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|