Help: Query All Network Drives - Available or Not

2005-09-28 Thread Michael Cohen

I have a problem trying to query all network drives that are currently used by my machine.  If I perform a simple net use command, I get the following response:

New connections will be remembered.

StatusLocal   Remote  Network
---
Unavailable L:\\rtpgsa.raleigh.ibm.com\rtpgsa
Microsoft Windows Network
Unavailable M:\\rtpgsa.raleigh.ibm.com\homes
Microsoft Windows Network
Unavailable P:\\MICOHEN3-AFS\projects  Microsoft Windows Network
Unavailable R:\\MICOHEN3-AFS\rootMicrosoft Windows Network
Unavailable T:\\MICOHEN3-AFS\nt Microsoft Windows Network
Unavailable U:\\MICOHEN3-AFS\userMicrosoft Windows Network
Unavailable V:\\MICOHEN3-AFS\vlibMicrosoft Windows Network
Disconnected X:\\squeaker\f$   Microsoft Windows Network
Disconnected Y:\\squeaker\c$   Microsoft Windows Network
OK  Z:\\micohen2.raleigh.ibm.com\g$
Microsoft Windows Network
The command completed successfully.


However, if I use either the Win32::AdminMisc::GetDrives or Win32::FileOp::Mapped commands to query the network drives, I only get responses indicating the two drives, X and Y, which in net use are disconnected, and Z, which is OK.

How do I get a list of ALL network drives, Available, Unavailable, and Disconnected, without actually using the net use command?

Thank you for your assistance!

Regards,
Michael Cohen
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Help: Query All Network Drives - Available or Not

2005-09-28 Thread Giuoco, Aaron



Win32::DriveInfomight be of some use. Get all of the drive 
letters with DrivesInUse(). I guess testing can be done with a 
DriveSpace() slice. If it's successful, the drive is 
accessible.

AG


  -Original Message-From: Michael Cohen 
  [mailto:[EMAIL PROTECTED]Sent: Wednesday, September 28, 2005 1:18 
  PMTo: perl-win32-users@listserv.ActiveState.comSubject: 
  Help: Query All Network Drives - Available or Not
  I have a problem trying to query all network drives that are currently used 
  by my machine. If I perform a simple "net use" command, I get the following 
  response:New connections will be 
  remembered.StatusLocal   
  Remote  
  Network---Unavailable 
  L:
  \\rtpgsa.raleigh.ibm.com\rtpgsa
 
   Microsoft 
  Windows NetworkUnavailable M:
  \\rtpgsa.raleigh.ibm.com\homes
 
   Microsoft 
  Windows NetworkUnavailable P:
  \\MICOHEN3-AFS\projects  Microsoft Windows 
  NetworkUnavailable R:
  \\MICOHEN3-AFS\rootMicrosoft Windows 
  NetworkUnavailable T:
  \\MICOHEN3-AFS\nt Microsoft Windows 
  NetworkUnavailable U:
  \\MICOHEN3-AFS\userMicrosoft Windows 
  NetworkUnavailable V:
  \\MICOHEN3-AFS\vlibMicrosoft Windows 
  NetworkDisconnected X:\\squeaker\f$ 
Microsoft Windows 
  NetworkDisconnected Y:\\squeaker\c$ 
Microsoft Windows 
  NetworkOK  Z:   
   \\micohen2.raleigh.ibm.com\g$   
 

  Microsoft Windows NetworkThe command completed 
  successfully.However, if I use either the 
  Win32::AdminMisc::GetDrives or Win32::FileOp::Mapped commands to query the 
  network drives, I only get responses indicating the two drives, "X" and "Y", 
  which in "net use" are "disconnected", and "Z", which is "OK".How do I 
  get a list of ALL network drives, "Available", "Unavailable", and 
  "Disconnected", without actually using the "net use" command?Thank you 
  for your assistance!Regards,Michael 
Cohen
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs