FunctionShowDriveType(drvpath)Dimfso,d,tSetfso=CreateObject(Scripting.FileSystemObject)Setd=fso.GetDrive(fso.GetDriveName(drvpath))SelectCased.DriveTypeCase0t=UnknownCase1t=Removable'移动硬盘Case2t=Fixed'硬盘Case3t=Network'网络硬盘Case4t=CD-ROMCase5t=RAMDisk'RAMEndSelectShowDriveType=Drive&d.DriveLetter&:-&tEndFunctionFunctionShowFreeSpace(drvPath)Dimfso,d,sSetfso=CreateObject(Scripting.FileSystemObject)Setd=fso.GetDrive(fso.GetDriveName(drvPath))'d为F:s=Drive&UCase(drvPath)&-s=s&d.VolumeName&s=s&FreeSpace:&FormatNumber(d.FreeSpace/1024,0)s=s&KBytesShowFreeSpace=sEndFunctionDimmessagemessage=ShowDriveType(F:\Programming\Applications)MsgBoxmessagemessage=ShowFreeSpace(F:\Programming\Applications)MsgBoxmessage