win32_logicaldisk not returning floppy disk parameters on windows xp sp3

Oct 23 2008 11:02 AM

I have recently installed windows XP SP3  and facing a problem with the old code in my project .
Following is the piece of code

 

SelectQuery query = new SelectQuery("select VolumeName, VolumeSerialNumber, Size, FreeSpace from win32_logicaldisk where drivetype=" + driveCode);

ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);

foreach (ManagementObject mo in searcher.Get())

{

if (mo["FreeSpace"] == null)
{
        //do this
}
else
//do this
}

On SP3 iam getting mo["FreeSpace"] as null even for a brand new floppy disk and a good drive.
The code returns appropriate memory availability on Windows XP SP2 .

Can any one help on this please ?