Thanks for asking the question again (why not after InstallFiles) - in my mind 
I had tried that and 
it failed.

So I tried it again and got:

Action ended 14:36:14: InstallFiles. Return value 1.
MSI (s) (E8:74) [14:36:14:935]: Doing action: CA_CopyMasterIni
MSI (s) (E8:74) [14:36:14:935]: Note: 1: 2205 2:  3: ActionText 
Action 14:36:14: CA_CopyMasterIni. 
Action start 14:36:14: CA_CopyMasterIni.
MSI (s) (E8:80) [14:36:14:995]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI6D25.tmp, Entrypoint: CopyMasterInifile
Action ended 14:36:15: CA_CopyMasterIni. Return value 1.

All seems to look well - but CA_CopyMasterIni did not succeed as the file that 
ended up in the 
destination directory was the one installed by the MSI and not the external one 
copied by the CA.

After I saw the log, I decided to rename the file installed by the MSI in my 
WIX code to see if 
overwriting was the failure point. It does appear so, for now I had both files 
in the dest. dir: the 
external one copied there by the CA and the installed one by a different name.

So my question becomes: Is there something I need to be aware of here? I am 
using CopyFile from the 
Win API with FailIfExists set to False, so it should overwrite an existing file.

Does MSIExec keep installed files locked while it's running?

Thanks again,
Kai











On Fri, 20 Sep 2013 07:52:26 -0700, Phil Wilson wrote:
> Indeed, the original post seems to say that the issue is that InstallFiles is 
> after the copy CA.
> It's not clear why the CA cannot be just moved to after InstallFiles.
>
> Phil Wilson
>
>
> On Thu, Sep 19, 2013 at 1:35 PM, Blair Murri <os...@live.com> wrote:
>
>> Now that your CA is deferred, what happens if you schedule it right after 
>> InstallFiles?
>>
>> Remember, verbose logs tell a lot about what is and/or isn't happening.
>>
>>> From: kpet...@otaksoft.com
>>> To: wix-users@lists.sourceforge.net
>>> Date: Thu, 19 Sep 2013 13:15:38 -0700
>>> Subject: Re: [WiX-users] Execution order issue
>>>
>>> Phil,
>>>
>>> modified it accordingly (I think..) and this places CA_CopyMasterIni
>>>
>> immediately BEFORE InstallFiles
>>> in the InstallExecute Sequence table
>>>
>>> <!-- this CA copies a template provided by customer's IT from
>>>
>> COMMON_APPDATA to final dest. -->
>>> <CustomAction
>>> Id="CA_CopyMasterIni"
>>> BinaryKey="BIN_InstallHelperDLL"
>>> DllEntry="CopyMasterInifile"
>>> Execute="deferred"
>>> Return="check"
>>> HideTarget="no"
>>> Impersonate="yes" />
>>>
>>> <!-- schedule custom actions -->
>>> <InstallExecuteSequence>
>>> <Custom Action="CA_BackupGlobalIni"  After="InstallInitialize" /> <Custom
>>> Action="CA_RestoreGlobalIni"
>>>
>> After="RemoveExistingProducts" />
>>> <Custom Action="CA_CopyMasterIni"    Before="InstallFiles" /> 
>>> </InstallExecuteSequence>
>>>
>>> How can I push it AFTER InstallFiles AND have it work? Surely there must
>>>
>> be a way..?
>>
>>>
>>> PS: Thanks for the warning re. repair/uninstall - had not thought abut
>>>
>> that!
>>
>>> Thanks for your help so far,
>>> Kai
>>>
>>>
>>> On Thu, 19 Sep 2013 07:20:46 -0700, Phil Wilson wrote:
>>>> Well that means that you put it between InstallInitialize and
>>>>
>> InstallFinalize but before
>>>> InstallFiles, if that's where it's supposed to be. Did you try that?
>>>>
>>>> It's not a safe design without some extra details. When InstallFiles
>>>>
>> copies your file, you need
>>>> to be sure it won't replace the one you already copied - what do have
>>>>
>> to prevent that from
>>>> happening?  You may also need a condition on your copy to prevent it
>>>>
>> from happening during a
>>>> repair or uninstall
>>>>
>>>> Phil Wilson
>>>>
>>>>
>>>> On Wed, Sep 18, 2013 at 5:48 PM, Kai Peters <kpet...@otaksoft.com>
>>>>
>> wrote:
>>
>>>>> My mistake for not specifying what else I had tried:
>>>>>
>>>>> When i switched to 'deferred' LIGHT complained:
>>>>>
>>>>> error LGHT0204 : ICE77: CA_CopyMasterIni is a in-script custom
>>>>>
>> action. It must be sequenced in
>>>>> between the InstallInitialize action and the InstallFinalize action
>>>>>
>> in the
>>>>> InstallExecuteSequence table
>>>>>
>>>>> I also found a piece of advice stating that in this case one should
>>>>>
>> schedule in
>>>>> InstallUISequence - but that just gave errors during MSI execution....
>>>>>
>>>>>
>>>>> On Wed, 18 Sep 2013 11:07:05 -0700, Phil Wilson wrote:
>>>>>
>>>>>> Your copy custom action is immediate - that means it will always
>>>>>>
>> happen
>>
>>>>> before any files are
>>>>>> actually copied. If you need it to run after InstallFiles has
>>>>>>
>> physically
>>
>>>>> copied files it should
>>>>>> be marked deferred.
>>>>>>
>>>>>> Phil Wilson
>>>>>>
>>>>>>
>>>>>> On Tue, Sep 17, 2013 at 10:45 PM, Kai Peters <kpet...@otaksoft.com>
>>>>>>
>>>>> wrote:
>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> hopefully my last newbie issue for some time (all previous issues
>>>>>>>
>> have
>>
>>>>> been resolved thanks to
>>>>>>> the great help from this list - thanks again!):
>>>>>>>
>>>>>>> I deploy a CA "CA_CopyMasterIni" to copy a configuration file
>>>>>>>
>> template
>>
>>>>> from location A to
>>>>>>> location B
>>>>>>> if my customer's IT dept. has dropped one in location A prior to
>>>>>>>
>>>>> installing my MSI.
>>>>>
>>>>>>> This works as expected.
>>>>>>>
>>>>>>> However, as this process is optional I always need to install a
>>>>>>>
>> default
>>
>>>>> template file (as shown
>>>>>>> below).
>>>>>>>
>>>>>>> The issue is that InstallFiles happens after my CA and thus the
>>>>>>>
>>>>> customer provided template gets
>>>>>>> overwritten if it was supplied. I had added NeverOverwrite="yes" to
>>>>>>>
>> the
>>
>>>>> template component in
>>>>>>> hopes
>>>>>>> that this would prevent this overwriting but it does not...
>>>>>>>
>>>>>>> If I change sequences in the InstallExecute table and push my CA
>>>>>>>
>> after
>>
>>>>> InstallFiles, the CA
>>>>>>> does not run.
>>>>>>>
>>>>>>> How can I achieve my goal?
>>>>>>>
>>>>>>> As always, thanks for any pointers,
>>>>>>>
>>>>>>> K.
>>>>>>>
>>>>>>>
>>>>>>> <DirectoryRef Id="AppDataProductLineFolder">
>>>>>>> <Component Id="COMP_IniTemplate" Guid="*" NeverOverwrite="yes" >
>>>>>>>
>> <File
>>
>>>>> Id="FILE_IniTemplate"
>>>>>>> Name="Quadra.ini" KeyPath="yes" Vital="no"
>>>>> Source="$(var.MiscDir)\Quadra.ini" /> </Component>
>>>>>>> </DirectoryRef>
>>>>>>>
>>>>>>>
>>>>>>> <!-- this CA copies an inifile template provided by customer's IT
>>>>>>>
>> from
>>
>>>>> COMMON_APPDATA to final
>>>>>>> destination --> <CustomAction Id="CA_CopyMasterIni"
>>>>>>>
>>>>> BinaryKey="BIN_InstallHelperDLL"
>>>>>>> DllEntry="CopyTestMasterInifile" Execute="immediate" Return="check"
>>>>>>>
>>>>> HideTarget="no"
>>>>>>> Impersonate="yes" />
>>>>>>>
>>>>>>>
>>>>>>> <!-- schedule custom actions -->
>>>>>>> <InstallExecuteSequence>
>>>>>>> <!-- back up  Quadra.ini before old version is uninstalled  -->
>>>>>>>
>> <Custom
>>>>>>> Action="CA_BackupGlobalIni" After="InstallValidate" />
>>>>>>>
>>>>>>> <!-- restore Quadra.ini after the old version has been uninstalled
>>>>>>>
>> --> <Custom
>>>>>>> Action="CA_RestoreGlobalIni" After="RemoveExistingProducts" />
>>>>>>>
>>>>>>> <!-- ... -->
>>>>>>> <Custom Action="CA_CopyMasterIni"    After="CA_RestoreGlobalIni" />
>>>>>>>
>>>>> </InstallExecuteSequence>
>>>>>>>
>>>>>>>
>> ------------------------------------------------------------------------------
>>  LIMITED TIME
>>
>>>>>
>>>>>>> SALE - Full Year of Microsoft Training For Just $49.99! 1,500+
>>>>>>>
>> hours of
>>
>>>>> tutorials including
>>>>>>> VisualStudio 2012, Windows 8, SharePoint
>>>>>>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power
>>>>>>>
>> Pack
>>
>>>>> includes
>>>>>>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>>>>>>>
>>>>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>>
>>>>>>> _______________________________________________ WiX-users mailing
>>>>>>>
>> list
>>
>>>>> WiX-
>>>>>>> us...@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>>>
>>>>>>
>> ------------------------------------------------------------------------------
>>  LIMITED TIME
>>
>>>>> SALE -
>>>>>
>>>>>> Full Year of Microsoft Training For Just $49.99! 1,500+ hours of
>>>>>>
>>>>> tutorials including
>>>>>> VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more.
>>>>>>
>>>>> BEST VALUE: New Multi-
>>>>>> Library Power Pack includes Mobile, Cloud, Java, and UX Design.
>>>>>>
>> Lowest
>>
>>>>> price ever! Ends 9/20/13.
>>>>>
>>>>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>>
>>>>>> _______________________________________________ WiX-users mailing
>>>>>>
>> list
>>
>>>>> WiX-
>>>>>> us...@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>>
>>>>>
>> ------------------------------------------------------------------------------
>>  LIMITED TIME
>>
>>>>> SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours
>>>>>
>> of tutorials including
>>>>> VisualStudio 2012, Windows 8, SharePoint
>>>>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
>>>>>
>> includes
>>>>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>>>>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>>
>>>>> _______________________________________________ WiX-users mailing
>>>>>
>> list WiX-
>>>>> us...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>>>
>> ------------------------------------------------------------------------------
>>  LIMITED TIME
>> SALE -
>>
>>>> Full Year of Microsoft Training For Just $49.99! 1,500+ hours of
>>>>
>> tutorials including
>>>> VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more.
>>>>
>> BEST VALUE: New Multi-
>>>> Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest
>>>>
>> price ever! Ends 9/20/13.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>>
>>>> _______________________________________________ WiX-users mailing list
>>>>
>> WiX-
>>>> us...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>> ------------------------------------------------------------------------------
>>
>>> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ 
>>> hours of
>>> tutorials including VisualStudio 2012, Windows 8,
>>>
>> SharePoint
>>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
>>>
>> includes
>>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>>
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>
>> ------------------------------------------------------------------------------
>>  LIMITED TIME
>> SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of 
>> tutorials including
>> VisualStudio 2012, Windows 8, SharePoint
>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack 
>> includes
>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>> _______________________________________________ WiX-users mailing list WiX-
>> us...@lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
> ------------------------------------------------------------------------------
>  LIMITED TIME SALE -
> Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials 
> including
> VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST 
> VALUE: New Multi-
> Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price 
> ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________ WiX-users mailing list WiX-
> us...@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&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