Thanks Blair! You explained so detailed. But I would like to know how to check 
installation log. Where is it?

Chunyan 



-----Ursprüngliche Nachricht-----
Von: Blair [mailto:os...@live.com] 
Gesendet: Donnerstag, 6. August 2009 20:18
An: 'General discussion for Windows Installer XML toolset.'
Betreff: Re: [WiX-users] WG: How to call Custom Action only on 
firsttimeinstall, not on Upgrade?

"NOT Installed AND NOT PREVIOUSFOUND"

The property identified in each UpgradeVersion element that does not have 
OnlyDetect set to "yes" is used by the RemoveExistingProducts action to perform 
the removal of the old version of the product.

For elements where OnlyDetect is set to "yes" the property is set, but 
RemoveExistingProducts ignores them.

When you perform a major upgrade, the package containing the new version will 
be seen as a new product (the ProductCode isn't already used on the
computer) so Installed will not be set (will be false). The upgrade table will 
be processed and if your Upgrade table is authored correctly PREVIOUSFOUND will 
be set to the ProductCode(s) of all previous versions installed.

When you perform a clean install (there is no previous version) Installed will 
still be false and PREVIOUSFOUND will also not be set, thus allowing the CA to 
run.

When you uninstall, Installed will be set (true) blocking the CA.

When the old package is uninstalled as part of the upgrade, Installed will be 
set blocking the CA in that old package.

During Minor upgrades/Small updates (including patching) and Repairs the 
Upgrade table isn't processed but Installed is set, thus blocking the CA as 
well.

You can't link your Upgrade element without having a RemoveExistingProducts 
element in place, so you must have it in there somewhere.

In your installation log, look for PREVIOUSFOUND to see when it is set, and for 
MyCA to see when it is either skipped or run.

-----Original Message-----
From: Jiang, Chunyan (GE Healthcare) [mailto:chunyan.ji...@ge.com]
Sent: Thursday, August 06, 2009 12:40 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] WG: How to call Custom Action only on first timeinstall, 
not on Upgrade?

Hi Blair,

I have tried "NOT Installed AND NOT REMOVEOLD". But MyCA is always be called 
for every upgrade. Is there something wrong with the Property='PREVIOUSFOUND'? 
What can I do for Upgrade?

Regards

Chunyan
-----Ursprüngliche Nachricht-----
Von: Jiang, Chunyan (GE Healthcare)
Gesendet: Donnerstag, 6. August 2009 08:58
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to call Custom Action only on first 
timeinstall,not on Upgrade?

Hi Blair,

Thank you for your explanation. The following is my Upgrade table: 

    <Upgrade Id='8517ae9a-667d-4bd3-9cea-4323be6d7040'>
      <UpgradeVersion OnlyDetect='no' Property='PREVIOUSFOUND'
        Minimum='1.0.0.0' IncludeMinimum='yes'
        Maximum='3.0.0.0' IncludeMaximum='no' />

    </Upgrade>

And the Custom Action is defined as:
<CustomAction Id='MyCA' FileKey='VPAdmin.exe' ExeCommand='VPAdmin -install 
-quiet' Return='asyncWait' />

I don't know how to use RemoveExistingProducts element. 

I will try "NOT Installed AND NOT REMOVEOLD". Thank you again for your help!


Chunyan

-----Ursprüngliche Nachricht-----
Von: Blair [mailto:os...@live.com]
Gesendet: Mittwoch, 5. August 2009 19:08
An: 'General discussion for Windows Installer XML toolset.'
Betreff: Re: [WiX-users] How to call Custom Action only on first timeinstall, 
not on Upgrade?

Please show us how you authored your Upgrade table.

UPGRADINGPRODUCTCODE is only set in the package being removed by the upgrade, 
so that one won't help. PATCH is set only when you are attempting to add a 
patch.

What you want is "NOT Installed AND NOT REMOVEOLD" or whatever you named your 
property that contains the product codes for RemoveExistingProducts to remove.

-----Original Message-----
From: Jiang, Chunyan (GE Healthcare) [mailto:chunyan.ji...@ge.com]
Sent: Wednesday, August 05, 2009 8:17 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to call Custom Action only on first time install, not 
on Upgrade?

Hi Wix-users,
 
I stuck at this issue: how to call Custom Action only on first install, but not 
on Upgrade. I wrote one installation package, which is able to upgrade.
In my .msi there is one Custom Action, which should be called only on first 
installation. I have tried the following ways to call this Custom Action.
But every time, it will be called both on first time install and on Upgrade.
 
<Custom Action="MyCA" After="InstallFinalize">NOT Installed</Custom>

 <Custom Action="MyCA" After="InstallFinalize">NOT Installed AND NOT PATCHFOUND 
</Custom>

 <Custom Action="MyCA" After="InstallFinalize">NOT Installed AND NOT PATCH 
</Custom>

 <Custom Action="MyCA" After="InstallFinalize">NOT Installed AND NOT 
UPGRADINGPRODUCTCODE </Custom>

 

Could some one give me some hint how to handle it?

 

Regards,

 

Chunyan

----------------------------------------------------------------------------
--
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

----------------------------------------------------------------------------
--
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

Reply via email to