We ended up just (writing) using a deferred CA from http://msiext.codeplex.com 
with a condition.

<SystemTools:DeleteFile File="..." ... >Uninstalling</SystemTools:DeleteFile>
<SystemTools:DeleteFiles Path="..." ... >Uninstalling</SystemTools:DeleteFiles>

dB. @ dblock.org 
Moscow|Geneva|Seattle|New York



-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Friday, April 30, 2010 5:57 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Deleting a file only when uninstalling - not installs, 
not upgrades, not repairs or modifies

Unless the transient flag is set on a component, conditions for that
component are only evaluated upon installation of that component.

I think a little illustration here of what happens during installs,
upgrades, and removals will help you understand.

Initial installation: component with GUID in MSI-1 is selected for
installation based on condition WHATEVER-2.

Repair: File will not be deleted, but may or may not be rewritten, depending
on several factors including the REINSTALLMODE variable and characteristics
of the file itself (is it versioned or not, timestamp and/or hash  or size
mismatches, etc.).

Upgrade (with "early" RemoveExistingProducts): Uninstall transaction is run
using cached/stripped MSI-1, then Install transaction is run using MSI-2.
Thus, the file will be deleted during the removal operation and then
possibly written during the installation operation based on condition
WHATEVER-2.

Upgrade (with "late" RemoveExistingProducts): Install transaction is run
using MSI-2, then Uninstall transaction is run using cached/stripped MSI-1.
As long as the file is from a component with the exact same GUID in both
MSIs the file will not be deleted during the uninstall portion if the
condition WHATEVER-2 requests installation, but the file may or may not be
overwritten (see Repair above).

Removal: File will be deleted, unless the component was marked Permanent.

Using the transient flag allows for removals during repairs, but can't
prevent removals during uninstall operations.

-----Original Message-----
From: Viv Coco [mailto:vcotirl...@hotmail.com] 
Sent: Wednesday, March 31, 2010 4:09 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Deleting a file only when uninstalling - not installs,
not upgrades, not repairs or modifies

Hi all,

I asked this question as part of another thread and then just noticed 
that it was not the right place as that thread was basically about smth 
else, so I'll ask this in a new thread here.

I would like a specific file, that it's NOT installed by the installer, 
but later created by the user, to be deleted only on uninstalls - not 
upgrades, not repairs or modifies. What condition should I use? Is (NOT 
UPGRADINGPRODUCTCODE) enough or should I also combine it with REMOVE="ALL"?

[code]
<Component Id="MyRemoveConfFile" Guid="GUID">
<RemoveFile Id="MyRemoveConf" Name="*myapp.conf" On="uninstall"/>
<Condition>NOT UPGRADINGPRODUCTCODE</Condition>
</Component>
[/code]

Is this enough (having On="uninstall" and (NOT UPGRADINGPRODUCTCODE))? 
Or the conditioning should be more extensive taking in account that it 
should happen only on real uninstall (not installs, not upgrades, not 
repairs or modifies)?

TIA,
Viv


----------------------------------------------------------------------------
--
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to