cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mescalero
Level 7

setting the app size in Add/Remove Programs

Hi All,

I have an IS MSI project, and I am trying to get round the problem whereby the app size in ARP is incorrect. I think I've hit upon a way to do it, and it's to call the following bit of Installscript as a custom action:

[PHP]szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{ProductCode}";
RegDBGetKeyValueEx(szKey, "EstimatedSize", nDataType, svValue, nvSize);

MsiSetProperty(ISMSI_HANDLE, "ARPSIZE", svValue);[/PHP]

But where in the Installer sequence must I call this CA in order for the registry key to have already been created, but before the ARPSIZE value is written to ARP? Or is there an easier way to do this?
Labels (1)
0 Kudos
(4) Replies
Mescalero
Level 7

Any thoughts on how to deal with this ARP size discrepancy?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The uninstall key is created by Windows Installer during the PublishProduct action. After this point setting any properties that are used to create the values in the uninstall key would have no effect. You could try setting the ARPSIZE property to an estimated value at least after CostFinalize (or InstallValidate) in the execute sequence. However, there isn't any guarantee that MSI will respect the value of this property as the documentation does not indicate it has any direct effect on the EstimatedSize value written to the uninstall key for a product.
0 Kudos
Mescalero
Level 7

Hi Josh,

Thanks. I did an arbitrary property set for ARPSIZE after CostFinalize, and it is not reflected in ARP, as you suggested might occur. (This is an IS MSI project.) For a Basic MSI project (used for the multi-instance capability), the size is accurate. Why the difference in behaviour, and is this something users of Installscript MSI setups just have to grin and bear?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The EstimatedSize stored in an uninstall key in the registry was only used for display purposes in Add/Remove Programs for MSI installations prior to Windows 7. Because InstallScript MSI uses its own uninstall key for Add/Remove Programs, the size value would be ignored on any Windows version earlier than Windows 7. This could explain the behavior with InstallScript MSI (or any non-MSI installer) on Vista/2008 or earlier.
0 Kudos