I recommend using WMI for this (if you are in a windoze environment). There is a perl interface for it or you could interface through jscript, vbscript, or .Net.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Sumit
Sent: Wednesday, October 15, 2003 4:46 PM
To: win32-admin
Subject: getting remote hard drive space

Hi All,
I am using the Win32::AdminMisc module to build some inventory information within our network. I am trying
the GetDriveSpace function to get the size of remote hard drives. The documentation of the module says that
if a UNC is used instead of local drive then a backslash should be used at the end. Here is what I am using
 
$drive = "\\\\$server\\C\$\\";
{($FixedDrives{$drive}->{Size}, $FixedDrives{$drive}->{Free}) = Win32::AdminMisc::GetDriveSpace($drive);}
 
And on running this I get undefined value. Any idea whats wrong with the code or has anyone encountered this
before. I got the module from Jenda Krynick's ppm repository.
 
Also is there any way to find out the number of fixed drives on a remote machine?
 
Thanks in advance,
Sumit.
 

Reply via email to