This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to manually define feature size?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
04:05 AM
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?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
07:50 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
01:27 PM
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
//---------------------------------------------------------------------------
// 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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
01:57 PM
A quick example with that same code works for me (in InstallShield 2008); which feature dialog box are you using?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2008
03:34 AM
Thanks, it works now!!!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
03:04 AM
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
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