The short answer is that there is no reasonable way to do this. The
unreasonable way is to also add the file to the Binary table, write a bunch
of code that streams it from the Binary table to disk, then you read the
value. Nobody here thinks that anything like that is a reasonable solution.
Because you already have the ini file available when you build the MSI
file, the approaches that actually will work are things like this:
1. Extract the model and port from the ini file at build time and put them
in the Property table of the MSI file. This is a scriptable post-build
event that works because the MSI file can be updated like a database with
SQL commands.
2. If there's an executable that requires the ini file, then update the
executable's resources with the data from the ini file at build time. Then
the exe runs and gets the info from its resources with no custom actions or
MSI stuff at all. I think you could even get Visual Studio to include the
ini file in the resources at build time, if that's easier.
3. There's no way copy a file to the system before Windows copies the files
to the system with InstallFiles, so re-examine exactly why you need this
ini file *before* InstallFiles. If it's for a custom action, then run the
custom action later. You haven't explained why "before InstallFiles" is a
requirement, and it's possible that this is not necessary to get the task
done.

Phil Wilson


On Thu, Aug 29, 2013 at 2:15 AM, John Ludlow <john.ludlow...@gmail.com>wrote:

> If the file is packaged inside the MSI, how would anything copy it before
> the InstallFiles action?
>
> The only scenario that makes sense here (as far as I can see) is that
> you're in an upgrade situation, and you want to copy the version of the
> file you're upgrading from to the temp folder and read some information
> from it.
>
> Is that the case or are you in some other scenario? You're going to have to
> help us understand your situation if we're going to be able to help you.
>
>
> On 29 August 2013 08:22, ak m <wixak...@gmail.com> wrote:
>
> > Could anyone help me on this?
> >
> >
> > On Mon, Aug 26, 2013 at 10:45 AM, ak m <wixak...@gmail.com> wrote:
> >
> > > File is packaged in MSI. INI file contains not only Model information
> but
> > > also about the port information etc...
> > >
> > > Basically this INI file is used for silent installation
> > >
> > > Anil
> > >
> > >
> > > On Sat, Aug 24, 2013 at 12:24 AM, Phil Wilson <phildgwil...@gmail.com
> > >wrote:
> > >
> > >> Exactly where is this ini file? It doesn't sound like it's actually
> > >> packaged in the MSI file. Do you actually need the ini file or just
> the
> > >> model number out of it?
> > >>
> > >> There's the  DiFX framework for installing drivers - that might be
> > useful.
> > >>
> > >>
> > >>
> >
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff537782(v=vs.85).aspx
> > >>
> > >> Phil Wilson
> > >>
> > >>
> > >> On Fri, Aug 23, 2013 at 7:23 AM, ak m <wixak...@gmail.com> wrote:
> > >>
> > >> > Dear All,
> > >> >
> > >> > when user clicks MSI,
> > >> > 1. Copy the INI file to local temp folder before Install Files
> action
> > >> (MSI
> > >> > action)
> > >> > 2. Get the model information from INI
> > >> > 3. Install the printer driver
> > >> >
> > >> > Could any one help me on this?
> > >> >
> > >> > Thanks in Advance...
> > >> >
> > >> > Anil
> > >> >
> > >> >
> > >>
> >
> ------------------------------------------------------------------------------
> > >> > Introducing Performance Central, a new site from SourceForge and
> > >> > AppDynamics. Performance Central is your source for news, insights,
> > >> > analysis and resources for efficient Application Performance
> > Management.
> > >> > Visit us today!
> > >> >
> > >>
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> > >> > _______________________________________________
> > >> > WiX-users mailing list
> > >> > WiX-users@lists.sourceforge.net
> > >> > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >> >
> > >>
> > >>
> >
> ------------------------------------------------------------------------------
> > >> Introducing Performance Central, a new site from SourceForge and
> > >> AppDynamics. Performance Central is your source for news, insights,
> > >> analysis and resources for efficient Application Performance
> Management.
> > >> Visit us today!
> > >>
> > >>
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> > >> _______________________________________________
> > >> WiX-users mailing list
> > >> WiX-users@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/wix-users
> > >>
> > >
> > >
> >
> >
> ------------------------------------------------------------------------------
> > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> > Discover the easy way to master current and previous Microsoft
> technologies
> > and advance your career. Get an incredible 1,500+ hours of step-by-step
> > tutorial videos with LearnDevNow. Subscribe today and save!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to