Available Disk Space on Components page.
Hi,
Is there a way to display the available space on the
Components page instead of the Directory page since I am
not using the Directory page (MUI)?
Thanks in advance.
Rishi.
Archive: Available Disk Space on Components page.
Available Disk Space on Components page.
Hi,
Is there a way to display the available space on the
Components page instead of the Directory page since I am
not using the Directory page (MUI)?
Thanks in advance.
Rishi.
NSIS doesn't show the available space on the Components page because the user has not yet selected a drive to install the program on at that point in the installer. If you wanted to put a disk space counter on the Components page, you could use System.dll to get the available space on C: and then use SendMessage to set the text on the Components page. However this might require modifying the UI file with Resource Hacker or similar.
Here's a simple example of setting the text:
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SetText
Function SetText
; Here you want to put code to get the abount of disk space available on C:.
; This example assumes that the value is stored in $0, and that the value is in MB.
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1023
SendMessage $0 0xC 0 "STR:Space Required: replace_with_space_required$\nSpace Available: $0MB"
FunctionEnd