NSIs check disk space is insufficient, reproduced from: http://stackoverflow.com/questions/989172/how-can-i-check-free-space-during-a-nullsoft-silent-install
! Include filefunc. nsh <br/>! Insertmacro drivespace </P> <p> name "checkfreespace" <br/> OUTFILE "C:/checkfreespace.exe" </P> <p> installdir C: /tmp/checkfreespace </P> <p> page instfiles </P> <p> section "install_section" install_section_id <br/> call checkfreespace </P> <p> createdirectory $ instdir <br/> setoutpath $ instdir <br/> file "C: /installme. bat "</P> <p> writeuninstaller" $ instdir/uninstall.exe "</P> <p> detailprint" installation successful. "<br/> sectionend </P> <p> section" Uninstall "</P> <p> rmdir/R" $ instdir "</P> <p> sectionend </P> <p> function checkfreespace </P> <p> var/Global installsize <br/> var/Global adjustedinstallsize <br/> var/Global freespace <br/> VaR /Global instdrive </P> <p>; verify that we have sufficient space for the install </P> <p>; sectiongetsize returns the size of each section in kilobyte. <br/> sectiongetsize $ {install_section_id} $ installsize </P> <p>; adjust the required install size by 10 MB, as a minimum amount <br/>; of free space left after installation. <br/> intop $ adjustedinstallsize $ installsize + 10240 </P> <p>; compute the drive that is the installation target; the <br/>; $ {drivespace} Macro will not accept a path, it must be a drive. <br/> strcpy $ instdrive $ instdir 3 </P> <p>; compute drive space free in kilobyte <br/>$ {drivespace} $ instdrive "/D = f/S = K" $ freespace </P> <p> detailprint "determined installer needs $ adjustedinstallsize KB ($ installsize KB) while $ freespace KB is free "</P> <p> intcmp $ adjustedinstallsize $ freespace spaceok </P> <p> MessageBox mb_ OK | mb_iconstop" insufficient space for installation. please free space for installation directory $ instdir and try again. "<br/> detailprint" insufficient space for installation. installer needs $ adjustedinstallsize kb, but freespace is only $ freespace kb. "<br/> abort" insufficient space for installation. "</P> <p> spaceok: <br/> detailprint" installation target space is sufficient "</P> <p> functionend <br/>
Memo
The end