PDA

View Full Version : Add/Remove Programs - Size Display



kweatherhead
10-17-2007, 08:53 PM
Greetings,

While not critical, I was wondering why when I build an Installer with SF 7.0 the "size" never shows up in the Add and Remove Programs module of the Control Panel. I have the latest rev (7.0.6.1) on an XPpro-SP2 system.

What am I not doing?

Regards,
Keith

Steve_K
10-18-2007, 03:34 AM
I think this is because SF does not write the size of an installation to the uninstall section of the registry. The value name that holds the installation size is 'Size' and it's a REG_SZ value data type.

Maybe you should set it manually in one of the after install action sections ...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\[PRODUCT NAME]

Valuename: Size
Datatype: REG_SZ

Hope that helps.

Steve

kweatherhead
10-18-2007, 06:50 AM
I think this is because SF does not write the size of an installation to the uninstall section of the registry. The value name that holds the installation size is 'Size' and it's a REG_SZ value data type.

Maybe you should set it manually in one of the after install action sections ...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\[PRODUCT NAME]

Valuename: Size
Datatype: REG_SZ

Hope that helps.
i
Steve

Thanx for the info, if no one else comes back with a better answer, yours just may be the winner of the day... if does not seem to be that much to implement, but I would presume that you would have to manually update that value... or is there a way for SF 7.0 to supply that value so that it was always correct at run-time?

Regards,
Keith

pww
10-19-2007, 09:26 AM
not sure if this info needs to be precise - it just has to give the user an idea about how much space the program components occupy. Nobody cares if it's 10.23 MB or 10.34 MB, so simply 10 MB seems OK for me.

Another thing is the size may vary from system to system - say you have some 2 MB .dll, on some systems it may exist so your installer will not copy it to the target system. Should then these 2MB be added to the size?
Or there may be conditionally installed files.

The only way to have an exact size is to sum up the sizes of all files the installer actually copies to the target system, and from a post install script action to write this to the registry. But I doubt the effort is justified.

Lorne
10-19-2007, 09:59 AM
You can use SetupData.CalculateRequiredSpace() to get the amount of space required for the setup.

If your project displays a Select Install Folder screen, that screen already calls SetupData.CalculateRequiredSpace() and stores the value in a Lua variable named _SpaceRequired, and a session variable named %SpaceRequired%.

jassing
10-20-2007, 05:28 PM
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\[PRODUCT NAME]

Valuename: Size
Datatype: REG_SZ

Are you sure about that? I just added that entry to three things, set them all to "1000" and changed "EstimatedSize" to 2000 -- rebooted, checked, and no differences....