View Single Post
Old 7th June 2019, 21:02   #4
ahmett
Junior Member
 
Join Date: Jan 2008
Posts: 21
var /global comspec
ExpandEnvStrings $comspec "%COMSPEC%"
nsexec::exectostack '"$comspec" /C wmic logicaldisk get size,freespace,caption'
Pop $0
Pop $0
${WordFind} "$0" "$\n" "*" $1
${For} $2 1 $1
${WordFind} "$0" "$\n" "+$2" $3
${WordFind} "$3" ":" "+1}" $4
${if} $3 != $4
${WordFind} "$3" " " "+1" $4
${WordFind} "$3" " " "+2" $5
${WordFind} "$3" " " "+3" $6
Math::Script 'r7 = f((r6=r6/1048576)-(r5=r5/1048576))'
Strcmp $7 0 +2
detailprint "Drive $4 Total:$6MB Free:$5MB Used:$7MB"
${endif}
${Next}
ahmett is offline   Reply With Quote