Thanks Pally!
I have figured the caused reason:
I do changed the INSTALLDIR after CostFinalize, so does the Wix sample.
but I forgot to call MsiSetTargetPath or publish SetTargetPath
ControlEvent,  it caused the installer doesn't resolve.
after I add it,  it works now.

thanks!
William L.

On Thu, Jul 7, 2011 at 10:49 PM, Pally Sandher <pally.sand...@iesve.com> wrote:
> http://msdn.microsoft.com/en-us/library/aa368609.aspx says the following:
>
> " .If a substring of the form [#filekey] is found, it is replaced by the full 
> path of the file, with the value filekey used as a key into the File table. 
> The value of [#filekey] remains blank and is not replaced by a path until the 
> installer runs the CostInitialize action, FileCost action, and CostFinalize 
> action. The value of [#filekey] depends upon the installation state of the 
> component to which the file belongs. If the component is run from the source, 
> the value is the path to the source location of the file. If the component is 
> run locally, the value is the path to the target location of the file after 
> installation. If the component has an action state of absent, the installed 
> state of the component is used to determine the [#filekey] value. If the 
> installed state of the component is also absent or null, [#filekey] resolves 
> to an empty string, otherwise it resolves to the value based upon the 
> component's installed state."
>
> Hence I suspect you're somehow modifying the path after it's been resolved by 
> CostInitialize, FileCost or CostFinalize which your log file would tell you 
> (assuming the component is being installed locally) which is why it's not 
> resolving correctly.
>
> Oh and the manual page should say "The Value property uses the special # 
> character to tell *Windows Installer* to look up the full installed path of 
> the file with the id myapplication.exe."
>
> Palbinder Sandher
> Software Deployment Engineer
> T: +44 (0) 141 945 8500
> F: +44 (0) 141 945 8501
>
> http://www.iesve.com
> **Design, Simulate + Innovate with the <Virtual Environment>**
> Integrated Environmental Solutions Limited. Registered in Scotland No. 
> SC151456
> Registered Office - Helix Building, West Of Scotland Science Park, Glasgow 
> G20 0SP
> Email Disclaimer
>
> -----Original Message-----
> From: william lee [mailto:wele...@gmail.com]
> Sent: 07 July 2011 15:41
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] LaunchFile is a standard custom action?
>
> Hi,
> I'd like to follow up this thread, because I found out a issue, the
> example here seems not working:
> http://wix.sourceforge.net/manual-wix3/run_program_after_install.htm
>
> In this tutorial, it said "The Value property uses the special #
> character to tell WiX to look up the full installed path of the file
> with the id myapplication.exe."
> <Property Id="WixShellExecTarget" Value="[#myapplication.exe]" />
>
> But in my testing, it does not always works.
> when we use the default location, everything seems fine.
> but if we change the install location to a customize folder, it cannot
> launch the application after install.
> Instead it raise the error in log:
>
> Action start 22:27:19: SetCONFIGInstallLocation.
> MSI (c) (48:58) [22:27:19:862]: PROPERTY CHANGE: Adding
> WixShellExecTarget property. Its value is '[#myapplication.exe]'.
> Action ended 22:27:19: SetCONFIGInstallLocation. Return value 1.
> MSI (c) (48:58) [22:27:19:862]: Doing action: LaunchApplication
> Action 22:27:19: LaunchApplication.
> Action start 22:27:19: LaunchApplication.
> MSI (c) (48:A8) [22:27:19:916]: Invoking remote custom action. DLL:
> C:\Users\admin\AppData\Local\Temp\MSI3B7B.tmp, Entrypoint:
> WixShellExec
> Action ended 22:27:20: LaunchApplication. Return value 3.
> DEBUG: Error 2896:  Executing action LaunchApplication failed.
> The installer has encountered an unexpected error installing this
> package. This may indicate a problem with this package. The error code
> is 2896. The arguments are: LaunchApplication, ,
>
>
> any ideas why it doesn't work?
>
> thanks!
> William L.
>
> On Tue, May 24, 2011 at 8:42 AM, william lee <wele...@gmail.com> wrote:
>> Thanks Palbinder and Chris !
>> I didn't realize it is a msidbCustomActionTypeExe type CA.  that can
>> explain.
>>
>> and final question from me,  what's the recommend way to launch the file
>> after install ?
>> Wix Tutorial and Manual show us two different way, any Pros vs Cons?
>> thanks!
>> William L.
>> On Mon, May 23, 2011 at 6:09 PM, Pally Sandher <pally.sand...@iesve.com>
>> wrote:
>>>
>>> LaunchFile is used as an identifier. It means nothing outside the
>>> context of that package. It could be called
>>> Supercalifragilisticexpialidocious for all the difference it would make.
>>> That code defines a Type 2 Custom Action & if you look down the page to
>>> the next paragraph you'll see where it is sequenced in the
>>> InstallExecuteSequence using that Identifier.
>>>
>>> Palbinder Sandher
>>> Software Deployment Engineer
>>> T: +44 (0) 141 945 8500
>>> F: +44 (0) 141 945 8501
>>>
>>> http://www.iesve.com
>>> **Design, Simulate + Innovate with the <Virtual Environment>**
>>> Integrated Environmental Solutions Limited. Registered in Scotland No.
>>> SC151456
>>> Registered Office - Helix Building, West Of Scotland Science Park,
>>> Glasgow G20 0SP
>>> Email Disclaimer
>>>
>>> -----Original Message-----
>>> From: william lee [mailto:wele...@gmail.com]
>>> Sent: 23 May 2011 10:52
>>> To: General discussion for Windows Installer XML toolset.
>>> Subject: Re: [WiX-users] LaunchFile is a standard custom action?
>>>
>>> Hi Palbinder,
>>> Thanks for the info, I noticed that article before. That one is easy to
>>> understand.
>>>
>>> my question is, from this tutorial:
>>> http://www.tramontana.co.hu/wix/lesson3.php
>>>
>>> following solution also works, as I verified:
>>>
>>> <*CustomAction* Id='LaunchFile' FileKey='FoobarEXE' ExeCommand=''
>>> Return='asyncNoWait' />
>>>
>>> but I don't know how.
>>> Is this LaunchFile CA is windows installer predefined CA?
>>>
>>> thanks,
>>> William L.
>>>
>>> On Mon, May 23, 2011 at 5:34 PM, Pally Sandher
>>> <pally.sand...@iesve.com>wrote:
>>>
>>> > I suspect the following manual page is what you're looking for ->
>>> > http://wix.sourceforge.net/manual-wix3/run_program_after_install.htm
>>> >
>>> > Palbinder Sandher
>>> > Software Deployment Engineer
>>> > T: +44 (0) 141 945 8500
>>> > F: +44 (0) 141 945 8501
>>> >
>>> > http://www.iesve.com
>>> > **Design, Simulate + Innovate with the <Virtual Environment>**
>>> > Integrated Environmental Solutions Limited. Registered in Scotland No.
>>> > SC151456
>>> > Registered Office - Helix Building, West Of Scotland Science Park,
>>> > Glasgow G20 0SP
>>> > Email Disclaimer
>>> >
>>> > -----Original Message-----
>>> > From: william lee [mailto:wele...@gmail.com]
>>> > Sent: 23 May 2011 07:58
>>> > To: General discussion for Windows Installer XML toolset.
>>> > Subject: [WiX-users] LaunchFile is a standard custom action?
>>> >
>>> > Hi,
>>> > Is the LaunchFile action a standard custom action provided by Windows
>>> > Installer?
>>> > I tried to search it, and no hits.
>>> > All I know is, it can launch the installed application after installed
>>> > with
>>> > File Key:
>>> > http://www.tramontana.co.hu/wix/lesson3.php
>>> > but I didn't find its implement in any wix ca dll.
>>> >
>>> > thanks,
>>> > William L.
>>> >
>>> ------------------------------------------------------------------------
>>> > ------
>>> > What Every C/C++ and Fortran developer Should Know!
>>> > Read this article and learn how Intel has extended the reach of its
>>> > next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> > developers boost performance applications - including clusters.
>>> > http://p.sf.net/sfu/intel-dev2devmay
>>> > _______________________________________________
>>> > WiX-users mailing list
>>> > WiX-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/wix-users
>>> >
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------
>>> ------
>>> > What Every C/C++ and Fortran developer Should Know!
>>> > Read this article and learn how Intel has extended the reach of its
>>> > next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> > developers boost performance applications - including clusters.
>>> > http://p.sf.net/sfu/intel-dev2devmay
>>> > _______________________________________________
>>> > WiX-users mailing list
>>> > WiX-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/wix-users
>>> >
>>> ------------------------------------------------------------------------
>>> ------
>>> What Every C/C++ and Fortran developer Should Know!
>>> Read this article and learn how Intel has extended the reach of its
>>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> developers boost performance applications - including clusters.
>>> http://p.sf.net/sfu/intel-dev2devmay
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What Every C/C++ and Fortran developer Should Know!
>>> Read this article and learn how Intel has extended the reach of its
>>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> developers boost performance applications - including clusters.
>>> http://p.sf.net/sfu/intel-dev2devmay
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to