I tried searching for this feature request and couldn't find it. I'm pondering 
the usefulness of a bundle defaults option, where the bundle could use an INI 
file to load the default values for variables. I know you can pass command line 
parameters to a bundle to set them, but I was thinking an INI file might be 
useful in the cases where an admin configures the install preferences once from 
a network share, and the bundle could then be ran by multiple users and inherit 
those values.

The way I would see this working is similar to how all the other existing 
Searches work.  This means a change to the Util extension to allow for a 
ReadINI option (only in scope for burn) and a modification to the engine to 
assign variables the values of the ini if the file exists. If the file doesn't 
exist, simply ignore any processing. In the bundle, I would expect to see 
something like...
<Variable Name="NetworkShare" Persisted="yes" Type="string" />
<Variable Name="AutomaticUpdates" Persisted="yes" Type="numeric" Value="#1" />

<util:ReadINI Name="Setup.ini" Section="Options" Name="NetworkShare" 
Variable="NetworkShare" />
<util:ReadINI Name="Setup.ini" Section="Options" Name="AutomaticUpdates" 
Variable="EnableUpdates" />

                And then these values could be mirrored on the Options page of 
the bundle with:

    <Page Name="Options">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" 
DisablePrefix="yes">#(loc.OptionsHeader)</Text>
        <Text X="11" Y="121" Width="-11" Height="17" FontId="3" 
DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
        <Editbox Name="NetworkShare " X="11" Y="143" Width="-91" Height="21" 
TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
        <Checkbox Name="AutomaticUpdates " X="11" Y="165" Width="-91" 
Height="17" TabStop="yes" FontId="3" 
HideWhenDisabled="yes">#(loc.AutomaticUpdatesCheckbox)</Checkbox>
        <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" 
TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
        <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" 
TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
        <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" 
Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
    </Page>

                In order to support this I would again have to enhance 
WixStdBA, so I am wondering how useful this would be outside of my realm before 
I put in the effort of the modifications.

Thanks,
Jacob

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to