[wix-users] Best Practice Question: How to load and display options from an ini file ?

Gary M garym at oedata.com
Mon Apr 25 09:59:18 PDT 2016


Thanks Sanket,

The pre-processor foreach loop seems to require early binding of referent
data. Maybe I have another race condition ?  I think I also need a
customaction.


I did get the ini file in a arbitrary directory.

I was hoping for ini file read and write code that wasn't so verbose.

I was trying to get some code that wasn't so verbose..

Write Ini File:
  <Fragment>
    <DirectoryRef Id="APP_ADMIN_DIR" >
      <Component Id="set.APP.INI.CFG"
Guid="{C4CB3CD1-DD79-4836-9EBD-9FFCFBC355E5}" KeyPath='yes'>
        <IniFile
          Id="set.APP.HOST.NAME"
          Directory="APP_ADMIN_DIR"
          Name="application.ini"
          Action="addLine"
          Section="host"
          Key="host_url"
          Value="'[APP.HOST.NAME]'"
        />
       </Component>
    </DirectoryRef>
   </Fragment>

Read Ini File:
    <Property Id="APP.HOST.NAME" >
      <IniFileSearch Id="get.APP.HOST.NAME" Name="application.ini"
Section="host" Key="host_url" Type="raw" >
        <DirectorySearch
          Id="getAPP.INI.DIR.REF"
          Path="[APP_ADMIN_DIR]"
        />
      </IniFileSearch>
    </Property>




On Sun, Apr 24, 2016 at 11:25 PM, Sanket Panchamia <psanket at gmail.com>
wrote:

> Hi,
>
> There is an IniFileSearchElement that will serve the purpose for you.
> However the ini files need to be in the system folder for this element to
> work.
> Else, I have implemented my own parser in a custom action using
> GetPrivateProfileString
> WritePrivateProfileString
>
> Hope this helps.
>
> Sanket
>
> On Mon, Apr 25, 2016 at 6:36 AM, Gary M <garym at oedata.com> wrote:
>
> > I have another nube question. How 'should' I load options into a combobox
> > from an ini file ?
> >
> > The second part... How should I parse the text string once loaded the
> > option is selected ?
> >
> >
> > thx
> > -g
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
>
>
> --
> Regards
> Sanket Panchamia
> +91-9742836299
>
> <https://twitter.com/p_sanket>  <http://www.facebook.com/spanchamia>
> <http://www.linkedin.com/in/psanket>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list