See wi tutorial here http://www.tramontana.co.hu/wix/lesson1.php#1.5 , about .ini file. If you do not have a better way out, I suggest you to make a tool installer for your former installer, which can install the configuration file and tell where the file locates by regitry key value. Then in your basic installer, just use wix elements about ini files. Best regards.
2009-11-13 salever.lee 发件人: Blair 发送时间: 2009-11-13 15:25:33 收件人: 'General discussion for Windows Installer XML toolset.' 抄送: 主题: Re: [WiX-users] How to read a file to a property Can you describe your build system? -----Original Message----- From: HuangRunzhen [mailto:h_runz...@hotmail.com] Sent: Thursday, November 12, 2009 9:12 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] How to read a file to a property Thanks. Do you know where I can find a tutorial or example about this? Runzhen > From: os...@live.com > To: wix-users@lists.sourceforge.net > Date: Thu, 12 Nov 2009 20:15:46 -0800 > Subject: Re: [WiX-users] How to read a file to a property > > When you build, you have access to the file you will be adding to the MSI > for installation. That file must exist at least before you call light.exe > when it gets bound, but depending on your build environment it will likely > be ready before you even call candle.exe. What I suggest is to read that > file during your build, extracting out whatever you need for your > installation, and populating your MSI with that information (could be via > preprocessor variables or even possibly linker variables depending on where > and how you are consuming that information. > > Even if you are replacing that file in your MSI post-linking, you can read > the file and alter the data in the database accordingly when you are > changing the file data in the database. > > Salever.lee, he needs to read an INI file he is installing. The support > WiX/Windows Installer has for that requires the INI file to exist/be > accessible before the installation starts. > > -----Original Message----- > From: salever.lee [mailto:salever....@gmail.com] > Sent: Thursday, November 12, 2009 5:47 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] How to read a file to a property > > Hi, > You can try to use *.ini files instead of *.txt files. As I known, Wix > has its way to deal with ini files, See Wix tutorial. > > Good luck. > > > 2009-11-13 > > > > salever.lee > > > > 发件人: HuangRunzhen > 发送时间: 2009-11-13 05:16:57 > 收件人: wix-users@lists.sourceforge.net > 抄送: > 主题: Re: [WiX-users] How to read a file to a property > > Thanks. > > I do need data from a file I am installing. Could you explain in more detail > "how to read from the file while building and populate your property that > way"? Do you mean I read the file from machine and put into a property and > use it in CA? > > If I use a deferred CA, can I change the registry directly by calling > WinAPI? > > Runzhen > > > From: os...@live.com > > To: wix-users@lists.sourceforge.net > > Date: Wed, 11 Nov 2009 23:04:42 -0800 > > Subject: Re: [WiX-users] How to read a file to a property > > > > If your custom action is in-script (read: deferred) it will be sequenced > > after all of the built-in actions that copy files. Of course, you can't > > change the Registry table from a deferred action (which is what I assume > you > > are trying to do here). > > > > We all assumed you were reading a text file that was already present on > the > > machine, not one you are installing. If you need data from a file you are > > installing, you should read from the file while building and populate your > > property that way (since the file and package are shipped together). > > > > -----Original Message----- > > From: HuangRunzhen [mailto:h_runz...@hotmail.com] > > Sent: Wednesday, November 11, 2009 10:29 PM > > To: wix-users@lists.sourceforge.net > > Subject: Re: [WiX-users] How to read a file to a property > > > > > > Is it possible to read a file in a component in custom action? I tried to > do > > that in custom action but the file is not copied yet when the custom > action > > is run. The custom action has a sequence of 4850, right before > > WriteRegistryValues. > > > > > > > > Thanks, > > > > Runzhen > > > > > Date: Thu, 12 Nov 2009 13:54:45 +1100 > > > From: sascha.beaum...@gmail.com > > > To: wix-users@lists.sourceforge.net > > > Subject: Re: [WiX-users] How to read a file to a property > > > > > > Hi, > > > > > > I was attempting to do the same a while back, but unless it's an INI > > > or XML file then you're out of luck and will need to code your own > > > custom action. It was easier for us to modify the application to > > > read/write to the registry and avoid text files in the future. > > > > > > Sascha > > > > > > > > > 2009/11/12 HuangRunzhen <h_runz...@hotmail.com>: > > > > > > > > Hi, > > > > > > > > > > > > > > > > I wonder if it is possible to read a .txt file into a property? I need > > to read this property in a custom action and encode it. > > > > > > > > > > > > > > > > Thanks, > > > > > > > > Runzhen > > > > > > > > _________________________________________________________________ > > > > MSN十周年庆典,查看MSN注册时间,赢取神秘大奖 > > > > http://10.msn.com.cn > > > > > > > ---------------------------------------------------------------------------- > > -- > > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day > > > > trial. Simplify your report design, integration and deployment - and > > focus on > > > > what you do best, core application coding. Discover what's new with > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > _______________________________________________ > > > > WiX-users mailing list > > > > WiX-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > > > > > > ---------------------------------------------------------------------------- > > -- > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day > > > trial. Simplify your report design, integration and deployment - and > focus > > on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > WiX-users mailing list > > > WiX-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > _________________________________________________________________ > > MSN十周年庆典,查看MSN注册时间,赢取神秘大奖 > > http://10.msn.com.cn > > > ---------------------------------------------------------------------------- > > -- > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > ---------------------------------------------------------------------------- > -- > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and focus > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > _________________________________________________________________ > 约会说不清地方?来试试微软地图最新msn互动功能! > http://ditu.live.com/?form=TL&swm=1 > ---------------------------------------------------------------------------- > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ---------------------------------------------------------------------------- > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ---------------------------------------------------------------------------- -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users _________________________________________________________________ 约会说不清地方?来试试微软地图最新msn互动功能! http://ditu.live.com/?form=TL&swm=1 ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users