How can you identify the drives available in the System?

Platform: ASP.NET|Category: Client Side Scripting

The drives available in system can be identified using the following code.

<HTML> 
     <HEAD> 
	<SCRIPT language=JavaScript> 

		function ShowAvailableDrives() 
		{ 
			document.write(GetDriveList()); 
		} 

		function GetDriveList() 
		{ 
			var fso,  s,  n,  e,  x; 
			fso  = new ActiveXObject('Scripting.FileSystemObject'); 
			e  = new Enumerator(fso.Drives); 
			s  =  ''; 
			do 
		 	{	 
		   		x  =  e.item(); 
		   		s  =  s  +  x.DriveLetter; 
				s  +=  ':-    '; 
				if (x.DriveType  ==  3)     n  =  x.ShareName; 
				else if (x.IsReady)     n  =  x.VolumeName; 
				else      n  =  '[Drive not ready]'; 
				s  +=  n  +  '
'; 
				e.moveNext(); 
			}while (!e.atEnd()); 
  
		 	return(s); 
		}
		</SCRIPT>
	</HEAD>
	<BODY>
	    <P>
	      <SCRIPT language=JavaScript>  ShowAvailableDrives(); 
	    </P>
	</BODY>
</HTML>