cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Server
Level 5

How to manually define feature size?

I have some empty features in the project because they are used in Billboard/Support Files. They reported as 0kb ones during installation. Actually, they take some space on the HDD. How to force feature size to appear or define them manually?
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

What type of project are you using? For InstallScript, you should be able to call FeatureAddCost; and for MSI, you can add data to the ReserveCost table.
0 Kudos
Server
Level 5

I use this method (but it is InstallShield 11.5) and feature's size still zero (actually, no files included in it, but I need non zero cost):

//---------------------------------------------------------------------------
// OnBegin
//
// The OnBegin event is called directly by the framework after the setup
// initializes. Note that this event will be called AFTER "Initialization"
// events (i.e.) OnSetTARGETDIR, OnCheckMediaPassword.
//
// Note: This event will not be called automatically in a
// program...endprogram style setup.
//---------------------------------------------------------------------------
function OnBegin()
number nCostHigh, nCostLow;
begin
CalculateAndAddFileCost( 0, 250 * 1024 * 1024, TARGETDIR, 0, nCostHigh, nCostLow );
FeatureAddCost( MEDIA, "DefaultFeature", TARGETDIR, nCostHigh, nCostLow );
end;

Devin Ellingson
Software Developer
InstallShield, A Macrovision Company
0 Kudos
RobertDickau
Flexera Alumni

A quick example with that same code works for me (in InstallShield 2008); which feature dialog box are you using?
0 Kudos
Server
Level 5

Thanks, it works now!!!
0 Kudos
CMartin
Level 3

Hi,
if I use the description below, to set the size of my features this will work fine.
But if the calculated size of the selected features is greater than the disk space ->the user selects another drive and now the size is calculated again.
The problem is in first calculation FeatureA (2.0MB) and on calculation again (+ 2.0MB) (2nd 4.0MB, 3rd 6.0MB and so on...)
How can i specify the size of my features not calculate again if there is a new drive selected?

Thanks
0 Kudos