You will need to calculate/retrieve INSTALLDIR via a custom action you run
before AppSearch, or use some directory other than INSTALLDIR for our
EXE_EXISTS property.

Since you only run that EXE when it was previously present, is that EXE
placed there using a previous installer package? Could you use a
ComponentSearch to locate the directory (or even the EXE itself)?

-----Original Message-----
From: puyo puy [mailto:puyo...@yahoo.com] 
Sent: Tuesday, September 15, 2009 12:06 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Wix 3.0 FileSearch

Hi Blair,

Thank you for your help.  I checked the log file.  AppSearch(property
EXE_EXISTS) was set before INSTALLDIR but CA_RunEXE was called after
INSTALLDIR set. 

Execute Sequences:
========
1. AppSearch property EXE_EXISTS assigned
2. Property INSTALLDIR assigned 
2. CA_RunEXE custom action evaluated but not called becase the codition
failed.
<Custom Action="CA_RunEXE"
After="InstallInitialize">EXE_EXISTS</Custom>

If I execute msiexec with INSTALLDIR parameter 

e.g.: msiexec /i test.msi /l*vx test.log installdir="C:\Program
Files\Company\Product\"

my custom action call sucessfully.  Can anyone know how to fix this problem?

Thanks
Jeff




--- On Mon, 14/9/09, Blair <os...@live.com> wrote:

From: Blair <os...@live.com>
Subject: Re: [WiX-users] Wix 3.0 FileSearch
To: "'General discussion for Windows Installer XML toolset.'"
<wix-users@lists.sourceforge.net>
Received: Monday, 14 September, 2009, 9:17 PM

INSTALLDIR may be set before your CA_RunEXE custom action runs (it will be
set by the time the standard action CostFinalize runs if it wasn't set
explicitly before, because CostFinalize populates all the properties
identified in the Directory table) but it may not be set when the standard
AppSearch runs, and that was the question Sebastian asked.

Can you confirm that INSTALLDIR is set before the AppSearch action runs?
Please search a debug verbose log for INSTALLDIR to see when it is first
set, and if that is before AppSearch or after.

-----Original Message-----
From: puyo puy [mailto:puyo...@yahoo.com] 
Sent: Monday, September 14, 2009 1:11 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Wix 3.0 FileSearch

Hi,

Can someone from WIX confirm that is a bug or I did something wrong.

Thanks
Jeff

--- On Fri, 11/9/09, puyo puy <puyo...@yahoo.com> wrote:

From: puyo puy <puyo...@yahoo.com>
Subject: Re: [WiX-users] Wix 3.0 FileSearch
To: "General discussion for Windows Installer XML toolset."
<wix-users@lists.sourceforge.net>
Received: Friday, 11 September, 2009, 9:29 AM

Hi Sebastian

Thank you for your quick reply.

Yes, I'm sure that INSTALLDIR was set before called.  I added extract custom
action before execute CA_RunEXE to display the property INSTALLDIR to the
log file and I can see the value is correct.  I copy that value and replaced
Path="[INSTALLDIR]" to Path="C:\Program Files\Company\Product\" and it
works.   

Function LogMsg
    Dim rec
    Set rec = Session.Installer.CreateRecord(1) 
    rec.StringData(0) = Session.Property("INSTALLDIR")
    LogInfo = Session.Message(&H04000000, rec)
End function

I also tried your suggestion to remove @Id from FileSearch but still doesn't
works.

<FileSearch Name="APP.exe" />

Thanks
Jeff 

--- On Thu, 10/9/09, Sebastian Brand (Instyler Software)
<wix+us...@instyler.com> wrote:

From: Sebastian Brand (Instyler Software) <wix+us...@instyler.com>
Subject: Re: [WiX-users] Wix 3.0 FileSearch
To: "'General discussion for Windows Installer XML toolset.'"
<wix-users@lists.sourceforge.net>
Received: Thursday, 10 September, 2009, 6:33 PM

Hello,

Are you sure the INSTALLDIR property is set already when the FileSearch
begins?
Also try removing the @Id from the FileSearch, I remember there was an issue
with that when trying to get sub-directories.

Best regards,
Sebastian Brand

Instyler Setup - Creating WiX-based MSI installations, elegantly.
http://www.instyler.com


-----Original Message-----
From: puyo puy [mailto:puyo...@yahoo.com] 
Sent: Thursday, September 10, 2009 10:31
To: wix users
Subject: [WiX-users] Wix 3.0 FileSearch

Hi there,

I'm trying to create msi installer using wix and this installer will search
for old application for current install location.  When the old application
found, a custom action will execute the old application.

I used the following script to search for the old application.
        <Property Id="EXE_EXISTS">
            <DirectorySearch Id="CheckInstallDir" Path="[INSTALLDIR]"
Depth="0" >
                <FileSearch Id="CheckExeFile" Name="APP.exe" />
            </DirectorySearch>
        </Property>
        
When the old application found, custom action "CA_RunEXE" will execute.
        <InstallExecuteSequence>
          <Custom Action="CA_RunEXE"
After="InstallInitialize">EXE_EXISTS</Custom>
        </InstallExecuteSequence>
        
But according to the msi log, action CA_RunEXE never execute because
condition is false even the old application exist.  From the log file I see
INSTALLDIR already set and pointed to correct location("C:\Program
Files\Company\Product\").   If I replace <DirectorySearch
Id="CheckInstallDir" Path="[INSTALLDIR]" Depth="0" > to <DirectorySearch
Id="CheckInstallDir" Path="C:\Program Files\Company\Product\" Depth="0" >,
the action CA_RunEXE executed as expected.  I cannot hardcode the Path as
user may install in different locations.

Can anyone of you can see what's wrong in my script?

Thanks in advance
Jeff


 
____________________________________________________________________________
______
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
----------------------------------------------------------------------------
--
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



     
____________________________________________________________________________
______
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
----------------------------------------------------------------------------
--
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



 
____________________________________________________________________________
______
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
----------------------------------------------------------------------------
--
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



 
____________________________________________________________________________
______
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to