cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

TIP: Prerequiste file costing not added to the associated feature

TIP: Be sure to add appropriate values to the Reserve Costing table for any prerequisites associated with a feature.

In testing I found that when I associate a setup prerequisite to a feature that the Custom Setup dialog reports 0KB of disk space required - for SQL 2005 Express! Since the Reserve Costing table has a foreign key only to the component table it is necessary to add a dummy component to the feature.
Labels (1)
0 Kudos
(9) Replies
Christopher_Pai
Level 16

You can use the ReserveCost table to pad the results, but it's practically impossible to do truely accurate costing in a situation like this.
0 Kudos
DLee65
Level 13

So true Christopher, I should have stated that in my post. However, it beats the alternative of not having enough disk space in the middle of a setup and potentially locking the system up completely.

My solution is to disable the feature if the prerequisite is already installed - so that means I need to add items to my App Search table, and then set the Feature InstallLevel to 1000 if the feature is already installed therefore costing is not incorporated.

However, like you were getting at Christopher, there is a potential that you might "over-cost" the feature because some of the features are already installed. For instance, in the SQL 2005 Express story mentioned above I may reserve the 198MB of disk space. However, if SQL 2005 Express is already installed then I am only going to be creating a new instance which will not use as much disk space.

Also, for something like SQL 2005 Express - part of the files can be installed to a different drive, but in the end, about 100MB of the files will still end up in %ProgramFiles%. So you have to have multiple components - some pointing to ProgramFiles, and others pointing to any custom directory that the user can set for their instance.

So it pays for the Installation developer to be careful and know thy prerequisites well!
0 Kudos
Not applicable

That is a really good point (at least to be aware of).

While we're on the subject, keep in mind that dialog only displays Cost Information for components whose destination is equal to the Feature's destination. So for your specific concern:
Also, for something like SQL 2005 Express - part of the files can be installed to a different drive, but in the end, about 100MB of the files will still end up in %ProgramFiles%. So you have to have multiple components - some pointing to ProgramFiles, and others pointing to any custom directory that the user can set for their instance.


It's likely that the costing values you might see would be wrong anyway 🙂
0 Kudos
DLee65
Level 13

Bryan,

I understand that the number of MB/GB used for a particular feature in the Custom Setup dialog only reflects the disk space used by components pointing to the same directory as the feature.

As a follow-up, how does costing for OutOfNoRbDiskSpace get calculated? I am more concerned that we somehow stop the user from getting themselves into a position where the OS is frozen due to low disk space. I am sure that OutOfNoRbDiskSpace calculates the cost at the component level and warns if there is not enough disk space in any one of the target directories.

An example of this is that we had an ASUS eee UMPC device in house for testing. In this particular model the C:\ drive (which I think is a flash drive) only has about 300MB of free space. I got into an install scenario where I had to manually clean up files in safe mode and then reboot and clean up the rest of the files. 🙂 While I might find this fun and a challenge I am not sure that our customers will find that as an enjoyable event. 😄

So before I pursue this idea of ReserveCost for Prerequisites associated with a feature, I want to be sure that InstallShield is not already adding the cost.
0 Kudos
Not applicable

I haven't seen any good documentation on how costing works. The generic File Costing article ( http://msdn.microsoft.com/en-us/library/aa368593(VS.85).aspx ) is not overly helpful.

Generally, I believe the OutOfNoRbDiskSpace property is primarily authored to give the Installation author the opportunity to disable rollback if necessary. The OutOfDiskSpace property is also present to cancel the installation/uninstallation.

We don't perform any specific costing for prerequisites that I know of. If there is some level of prereq costing, I have yet to observe it as it would require some kind of functional knowledge of what the prereq installed ( or a field that asks the author how much disk space to reserve, which doesn't exist ).

From an InstallShield perspective, I don't know that authoring the ReserveCost automatically would be an entirely good idea. However, I think if the prereq dialog included a "How much space would you like to reserve for this feature" it would be a nice addition. The difficulty is that the feature based prerequisite functionality doesn't exist in the .PRQ file, so how do you reserve cost for a prereq that's already failed in the non-feature based case? So it would probably have to be a project specific thing I presume. Any thoughts?

For your specific purposes, though, authoring the ReserveCost table would work.
0 Kudos
DLee65
Level 13

Bryan,

Adding a costing option to the prerequisite would be nice but you would also have to add options for specifying the target destination. Again it comes down to the Installation Engineer taking the time to research the prerequisite and knowing what target destinations are involved. For instance - I could choose to install the SQL Prerequisite to a variety of locations. The data could be on another target location depending on the level of options I provide the user. However, there are some features within the SQL Express package that have fixed destinations and therefore cannot be modified.

I suspect that the whole concept of Prerequisites should probably be revisited. For example now that we can install prerequisites during the execute sequence it should be possible to use Properties for command line options in the Prerequisites. Maybe this is possible now - I just have not tried it yet.

One of the things you could do in a future service pack to make this more obvious and to make sure that it does not escape the novice's attention is that when a user selects to associate a prerequisite with a feature, popup a tutorial or notice indicating the necessary steps needed to add costing for the prerequisite to avoid running out of disk space during the install.

What do others here think?
0 Kudos
Not applicable

For example now that we can install prerequisites during the execute sequence it should be possible to use Properties for command line options in the Prerequisites.


To clarify, you still can't do this. It's important to note that there is a bit setup driven functionality with Feature Based Prerequisites (or Functional Prereqs as they are more intimately known). It would be very bad practice to launch an install in the Execute Sequence 🙂

Not saying necessarily this is specifically what you mean, but I want to ensure that someone reading this doesn't get the wrong idea of what's going on behind the scenes. Effectively, you are launching prereqs in the execute sequence (using either functional prereqs or setup chaining); however, you're not really in the classic sense of the execute sequence in either case.

Also, passing properties to Prerequisites is something I think came up. I think there's something to that, but I don't know what.

One of the things you could do in a future service pack to make this more obvious and to make sure that it does not escape the novice's attention is that when a user selects to associate a prerequisite with a feature, popup a tutorial or notice indicating the necessary steps needed to add costing for the prerequisite to avoid running out of disk space during the install.


Sounds like good KB fodder at minimum. I'll see what can be done.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

To provide further clarification, while these prerequisites don't actually run during the execute sequence, you indeed can specify properties for prerequisite command line arguments. See the last few paragraphs of http://kb.acresso.com/doc/Helpnet/installshield15helplib/SetupPrereqEditorProgress.htm for details.
0 Kudos
DLee65
Level 13

After poking around a bit this information about costing is already documented in the article of "Setup Prerequisites vs. Feature Prerequisites"

Scroll down to the very bottom of the article, and read the information about calculating disk space.
0 Kudos