Then do it in a bootstrap program. Use the SDK examples for MsiGetFeatureCost that open the MSI file and do the costing and get the feature costs, then launch the MSI with a command line that sets the TARGETDIR property to a destination disk with enough space. That's actually quite straightforward.
The difficulty with making the decision during the MSI install is that you don't know feature cost until you've done costing, and costing includes calculation of what files might be overwritten, and that's why MsiGetFeatureCost wants you to do InstallValidate to get an accurate number - the destinations have already been chosen. I believe that the numbers in the feature dialogs are informational, and it's not until you (say) click Next that the real cost can be calculated. I don't believe that there's a way to do costing and then change your destination disk and do it all over again, although I really don't know how the CostInitialize/CostFinalize/InstallValidate voodoo works and how it ties into the feature tree. Phil Wilson -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SaiTeja Sent: Thursday, January 31, 2008 2:55 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Size of feature Hi, My question is different. See in CustomSetup Dialog, you will find one message as "This feature requires 200MB on your hard drive" Now for silent install functionality i want this number(200MB) to compare the space. For example: My C drive has actual disk space 100MB and D drive has space 2GB According to my silent install functionality, reqdiskspace is 200 MB, but C drive has only 100 MB So with my functionality, the installer automatically select next avilable drive(here D drive). if(reqdiskspace>actualdiskspace) go for next drive Presently reqdiskspace I hardcoded as 200MB(what ever the number is there in message "This feature requires....") But in future of my feature size increases to 300 MB, then again I have to modify manually "int reqdiskspace=300" So to avoid this, I want the number in that message. So i will get this number through MSIGETPROPERTY in my C++ DLL and I can use. SaiTeja wrote: > > > > Wilson, Phil wrote: >> >> Generally speaking you don't need to do this. If you want to ensure space >> at some directory location you use the ReserveCost mechanism and let >> Windows figure out if there's enough room. Windows already computes the >> size of the feature for space checking, and ReserveCost lets you change >> it. Why reinvent it? >> Hi, >> >> My question is different. >> >> See in CustomSetup Dialog, you will find one message as "This feature >> requires 200MB on your hard drive" >> >> Now for silent install functionality i want this number(200MB) to compare >> the space. >> >> For example: >> >> My C drive has actual disk space 100MB and D drive has space 2GB >> >> According to my silent install functionality, reqdiskspace is 200 MB, but >> C drive has only 100 MB >> So with my functionality, the installer automatically select next >> avilable drive(here D drive). >> if(reqdiskspace>actualdiskspace) >> go for next drive >> >> Presently reqdiskspace I hardcoded as 200MB(what ever the number is there >> in message "This feature requires....") >> >> But in future of my feature size increases to 300 MB, then again I have >> to modify manually >> "int reqdiskspace=300" >> >> So to avoid this, I want the number in that message. So i will get this >> number through MSIGETPROPERTY >> in my C++ DLL and I can use. >> >> >> >> >> >> >> >> >> If you want to try it yourself, MsiGetFeatureCost is perhaps what you'd >> call, but you'd have to sequence it after InstallValidate. I hesitate to >> even suggest this because the sequencing is critical, I doubt you can >> make it work in the UI sequence, and using sample code that tells you to >> call actions like InstallValidate yourself is likely to be giving you a >> shovel for the hole you'll be digging yourself into. >> >> So as is common with many MSI questions: >> >> Advice: Don't do it - use ReserveCost. >> >> Technically (mostly) accurate answer: MsiGetFeatureCost (but I think >> you'll regret it). >> >> Phil Wilson >> >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of SaiTeja >> Sent: Tuesday, January 29, 2008 8:10 PM >> To: wix-users@lists.sourceforge.net >> Subject: Re: [WiX-users] Size of feature >> >> >> Hi, >> >> Thanks for reply. >> >> What I want is size(XX MB). I want this number to assign some >> variable(int >> reqdiskspace) for checking disk space logic. >> Presently I added manually the variable reqdiskspace=YY(for ex int >> reqdiskspace=100) >> In future if size of feature increases then I again I have to modify >> manually the reqdiskspace. >> >> So is it possible to assign the same to property, so that I can get the >> value through msigetproperty. >> >> >> >> >> >> Sebastian Brand-2 wrote: >>> >>> The texts for this are definied in the properties >>> SelChildCostPos, SelChildCostNeg, SelParentCostPosPos, >>> SelParentCostPosNeg, SelParentCostNegPos, SelParentCostNegNeg >>> >>> In the MSI help you can find details about this at the SelectionList >>> control description >>> (http://msdn2.microsoft.com/en-us/library/aa371604.aspx >>> ) >>> >>> However, you cannot change the size displayed there. >>> >>> >>> Best regards, >>> Sebastian Brand >>> >>> Instyler Software - http://www.instyler.com >>> >>> >>> On Jan 26, 2008, at 12:27 , SaiTeja wrote: >>> >>>> >>>> Hi, >>>> >>>> On Cusomize dialog, "This feature requires xxMB on your hard drive" >>>> >>>> Can any one tell me is it possible assign size(xx) to any property? >>>> If yes >>>> how? >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Size-of-feature-tp15106940p15106940.html >>>> Sent from the wix-users mailing list archive at Nabble.com. >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by: Microsoft >>>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>>> _______________________________________________ >>>> WiX-users mailing list >>>> WiX-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/wix-users >>> http://msdn2.microsoft.com/en-us/library/aa371604.aspx >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> WiX-users mailing list >>> WiX-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wix-users >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Size-of-feature-tp15106940p15175138.html >> Sent from the wix-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> > > -- View this message in context: http://www.nabble.com/Size-of-feature-tp15106940p15202215.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users