获取最大容量盘符
优质
小牛编辑
132浏览
2023-12-01
引用脚本的内容:
!include "FileFunc.nsh" !include "LogicLib.nsh" OutFile "Demo.exe" SilentInstall silent Section ;查找所有硬盘驱动器(HDD) ${GetDrives} "HDD" "FindHDD" MessageBox MB_OK "最大可用空间驱动器盘符:$R2" SectionEnd Function "FindHDD" ;获取查找到的驱动器盘符($9)可用空间(/D=F)单位兆(/S=M) ${DriveSpace} $9 "/D=F /S=M" $R0 ${If} $R0 > $R1 StrCpy $R1 $R0 StrCpy $R2 $9 ${EndIf} Push $0 FunctionEnd