Archive: variable size on install page


variable size on install page
Hi, This website is a godsend and I have searched on this topic and found many useful links and ideas but I need a little help tying it all together.

I need to install:
1. .net 2 if not present (240MB required by .net installer)
2. files to $APPDATA (10MB)
3. files to $INSTDIR (350MB) installing from zips

So if a user needs .net installed when they hit the install page I can use SetSectionSize to set the size to 240+10+350.
but if the user then chooses another drive for the install I would need 350 on that drive and 250 free on the C:

I could after do a disk check for the available 250 on C: and give a warning but is there a cleaner way to do it?

many thanks in advance...


You could have the .NET test done before the directory page shows, e.g. in .onInit.


I have that been checked in the .onInit but if .NET is needed the example still applies - how do I indicate on the install page that space is needed on the C: drive regardless of what drive they choose as the install location?


You said it yourself, you use SetSectionSize to set the correct section size. The directory page will use that section size to determine how much space is needed for the installation.


sorry if I am not being clear, thank you for trying to help kichik.

I can indeed setSectionSize to be 240+10+350 on the install page but if they have no space on their C: drive and choose say their D: to install to - they will not have enough space on the C: to install .NET.

I would like an install page like:

space required - 600MB

and then if they choose a different location (D:)

space required - C: 250MB
D: 350MB

so that it still lets them know they have insuficient space for the install.


In that case, you'll have to implement a custom test. You can use CheckSpaceFree for that. I'd put the test on the leave function of the directory page along with a little text change in that page to note about the additional required space.


The ideal place to put it would be after the browse button returns the location of the install - then you could update the install sizes. I dont know if that is possible.


It's possible. Use .onVerifyInstDir, it's called whenever the installation directory changes, including changes by the browse button.


brilliant! exactly what i was looking for. cheers