!include "MUI2.nsh"
!include "FileFunc.nsh"
Name "获取指定磁盘分区的可用空间"
Caption "获取指定磁盘分区的可用空间"
OutFile "test.exe"
SilentInstall silent
Section
StrCpy $R1 "H:"
${DriveSpace} $R1 "/D=F /S=M" $R2
${If} $R2 < 100
StrCpy $R3 $R1 1
MessageBox MB_OK "$R3盘可用空间不足 100 M,请检查!"
${Else}
StrCpy $R3 $R1 1
MessageBox MB_OK "$R3盘可用空间为 $R2 M。"
${EndIf}
SectionEnd
© 版权声明
THE END
暂无评论内容