|
发表于 2011-3-21 20:29:05
|
显示全部楼层
#InClude <Process.Au3>
Global $DosTool=@SystemDir&'\DsptW.eXe'
Global $ParVol=@TempDir&'\ParVol.InI'
Global $IniFile=@TempDir&'\DskVol.InI'
Global $VolInfo=@TempDir&'\VolInfo.InI'
Global $Vol=@TempDir&'\PartInfo.InI'
Global $ShowDrive=@SystemDir&'\ShowDrive.eXe'
Global $ComLine=$DosTool&' /A /Pdr >'&$IniFile
If Not FileExists($ShowDrive) Then FileInstall('ShowDrive.Vxd',$ShowDrive,1)
_RunDOS($ShowDrive)
If FileExists($VolInfo) Then FileDelete($VolInfo)
If Not FileExists($DosTool) Then FileInstall('DsptW.Vxd',$DosTool,1)
_RunDOS($ComLine)
FileSetAttrib($IniFile,'+Sh')
For $i=3 To 26
$ReadFile=FileReadLine($IniFile,$i)
If $ReadFile='' Then ExitLoop
If StringMid($ReadFile,4,1)<>2 Then
$StrExt=StringReplace($ReadFile,': ','=')
FileWrite($VolInfo,StringLeft($StrExt,9))
FileWriteLine($VolInfo,'')
ElseIf StringLeft($ReadFile,4)=2 Then
$ReadFile=FileReadLine($IniFile,$i+1)
FileWrite($VolInfo,StringLeft($StrExt,9))
EndIf
Next
FileSetAttrib($VolInfo,'+RSh')
FileSetAttrib($IniFile,'-RSh')
FileDelete($IniFile) |
|