Archive: How to use calculated size from Directory Page?


How to use calculated size from Directory Page?
The Modern Interface Directory Page (MUI_PAGE_DIRECTORY) shows the 'Space required' for the total installation. Is there an easy way to get access to this value?

I want to store this value in the Uninstaller registry key EstimatedSize.

Now I'm doing:
!include "FileFunc.nsh"

# Add package size information to Uninstaller registry.
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${UninstallRegKey}" "EstimatedSize" "$0"


But seeing the value ready computed makes me wonder if there is an easier way to get to this info.


http://forums.winamp.com/showthread.php?t=320859

I think reading the values from the label might be better though but I don't think anyone has written code for that (maybe I will).

Stu


Thanks.
So there is no easy way to get to the info.


See attached. GetSpaceRequired gets the space required and space available values from either the components page (required only) or the directory page (both required and available values). It should only be used in the page leave functions. It should also work for different languages.

Stu