Actually the code:

<Component Id="RemoveLogosFile" Guid="PUT_MY_GUID">
   <RemoveFile Id="RemoveLogosFile" Name="MyLogo.jpg" On="uninstall"/>
   <RemoveFile Id="RemoveBundleFile" Name="bundle" On="uninstall"/>
   <Condition>(NOT UPGRADINGPRODUCTCODE) AND (REMOVE=ALL)</Condition>
</Component>

works as expected _if_:
<RemoveExistingProducts After="InstallFinalize"/>

meaning the 2 files are deleted _only_ during an uninstall from add/remove 
product and they _don't_ get deleted during an update.

But in my installer I have:
<RemoveExistingProducts After="InstallInitialize"/>

and the behavior in this case is that the 2 files are _always_ deleted 
regardless if it's an update or removal from add/remove programs.

Can somebody help me accomplish the deletion of those files only when 
uninstalling from add/remove programs and not during an update when having
<RemoveExistingProducts After="InstallInitialize"/>?

Thank you,
MeCoco


On 11/24/2010 4:10 PM, MeCoco wrote:
> Hi Blair,
>
> I seem to still have a problem: because I want the files that were
> placed with an empty GUID to be deleted when a real uninstall  happens
> (not update or repair, but an uninstall from add/remove programs), I
> also added the code:
>
> <Component Id="RemoveLogosFile" Guid="PUT_MY_GUID">
> <RemoveFile Id="RemoveLogosFile" Name="MyLogo.jpg" On="uninstall"/>
> <RemoveFile Id="RemoveBundleFile" Name="bundle" On="uninstall"/>
> <Condition>(NOT UPGRADINGPRODUCTCODE) AND (REMOVE=ALL)</Condition>
> </Component>
>
> but this code makes that after an update to end up without the 2 files:
> MyLogo.jpg and bundle. For some reason the condition seems to be
> evaluated to TRUE even when I'm running an update so these 2 files are
> always deleted.
>
> (Not sure if it's worth mentioning, but I still have the :
> <RemoveExistingProducts After="InstallInitialize"/>)
>
> Am I doing something wrong here?
>
> Thank you,
> MeCoco
>
>
> On 11/24/2010 2:39 PM, MeCoco wrote:
>> Hi Blair,
>>
>> Thanks a lot for your answer! That was exactly the code I just wrote and
>> I was testing just now all of the scenarios.
>>
>> Thanks,
>> MeCoco
>>
>> On 11/24/2010 1:23 PM, Blair wrote:
>>> In the original MSI you give to your sales people, create the MyLogo
>>> component with an empty guid. It will get left behind, and the presence of
>>> the bundle file will prevent its overwrite.
>>>
>>> -----Original Message-----
>>> From: MeCoco [mailto:vcotirl...@hotmail.com]
>>> Sent: Wednesday, November 24, 2010 1:22 AM
>>> To: General discussion for Windows Installer XML toolset.
>>> Subject: Re: [WiX-users] If file exists, don't update another file
>>>
>>> Hi Blair,
>>>
>>> First of all I have to mention that the partner problem is just for our
>>> sale people. To make everything clearer: all the clients, which mean
>>> _our_ and _their_ clients, will have _our_ logo, so I need a
>>> "workaround" only for our sale people, who for whatever reason want only
>>> for their demo systems to NOT have the partner logo updated. Being _our_
>>> sale people, meaning only a few people, I should find a workaround that
>>> do not disturb at all the already written and tested installer as it is
>>> now provided to all our clients.
>>> Because of that I actually thought like this:
>>> - for the sales people I will build a first time installer containing
>>> the exact same files like the normal installer, only that the mylogo.jpg
>>> content is different and also a dummy file, let's name it "bundle", gets
>>> also installed
>>> - they use this installer, install the product on their demo systems
>>> - after this point, any update we provide for _our_ clients should be
>>> used also by these sales ppl, with the point that mylogo.jpg in _their_
>>> cases should not be updated
>>>
>>> This is the request, so I was thinking: in the first time installer that
>>> we give _just_ to our sales people, the dumy file "bundle" gets
>>> installed and any later update (update that should be identical for our
>>> sale people and our clients) should take care not to update the
>>> mylogo.jpg if the "bundle" file is found, b/c then it's our sales
>>> people. In case the bundle file is not there, meaning is a client not a
>>> sales person, then the mylogo.jpg should be updated.
>>>
>>> Also I have to leave the:
>>> <RemoveExistingProducts After="InstallInitialize"/>
>>> untouched.
>>>
>>> Now, back to your answser Blair:
>>>     >    Do a FileSearch for the specific file, and based on that property
>>> condition your logo component to not install.
>>>
>>> I tried that:
>>>
>>> 1) I created a first time installer which was placing also a dummy
>>> "bundle" file into the install directory
>>> <Component Id="MyLogo.jpg" Guid="PUT-MY-GUID1">
>>> <File Id="MyLogo.jpg" Source="MyLogo.jpg" KeyPath="yes" Checksum="yes" />
>>> </Component>
>>> <Component Id="bundle" Guid="PUT-MY-GUID2">
>>> <File Id="bundle" Source="bundle" KeyPath="yes" Checksum="yes" />
>>> </Component>
>>>
>>>
>>> 2) Then created the update which will be used by everybody: clients and
>>> sales people
>>>
>>> <!-- Search the bundle file -->
>>> <Property Id='FILE_BUNDLE_EXISTS'>
>>> <DirectorySearch Id='DirSearch' Path='[INSTALLDIR]' Depth='0'>
>>> <FileSearch Id='FileSearch' Name='bundle'/>
>>> </DirectorySearch>
>>> </Property>
>>>
>>> <Component Id="MyLogo.jpg" Guid="PUT-MY-GUID1">
>>> <File Id="MyLogo.jpg" Source="MyLogo.jpg" KeyPath="yes" Checksum="yes" />
>>> <Condition>(NOT FILE_BUNDLE_EXISTS)</Condition>
>>> </Component>
>>> <Component Id="bundle" Guid="PUT-MY-GUID2">
>>> <File Id="bundle" Source="bundle" KeyPath="yes" Checksum="yes" />
>>> <Condition>FILE_BUNDLE_EXISTS</Condition>
>>> </Component>
>>>
>>> But after running the update I ended up by not having the MyLogo.jpg
>>> installed at all.
>>>
>>> Is there any other way to accomplish this?
>>>
>>> Thank you!
>>> MeCoco
>>>
>>>
>>> On 11/24/2010 2:48 AM, Blair wrote:
>>>> Do a FileSearch for the specific file, and based on that property
>>> condition
>>>> your logo component to not install.
>>>>
>>>> -----Original Message-----
>>>> From: MeCoco [mailto:vcotirl...@hotmail.com]
>>>> Sent: Tuesday, November 23, 2010 6:35 AM
>>>> To: General discussion for Windows Installer XML toolset.
>>>> Subject: Re: [WiX-users] If file exists, don't update another file
>>>>
>>>> Hi Dave,
>>>>
>>>> I can't do that. Here is the explanation: we have a product which we
>>>> release to different clients. We also have a partner with whom we
>>>> bundle, so he wants to offer our product together with his, but the logo
>>>> should stay his logo. We can't have his logo and our logo in the
>>>> installer, as we don't want the clients digging that up.
>>>> So we agreed on the following: first time when he installs the product
>>>> he places a dummy file.txt into the installation directory and his own
>>>> logo. When we provide an installer which is upgrading our software, in
>>>> case the update is for our own clients, the logo should be updated, but
>>>> if the upgrade is run by the partner-client the logo shouldn't be
>>>> updated, so basically our update should check if the file.txt is there
>>>> and if yes should not update the logo.
>>>>
>>>> In other words: if in the installation folder there is a specific file,
>>>> eg file.txt, then a specific file, eg mylogo.jpg should _not_ be updated.
>>>>
>>>> And I'm not sure how one can do that when:
>>>> <RemoveExistingProducts After="InstallInitialize"/>
>>>> as from what I read, the product is completely removed first so his logo
>>>> will be gone.
>>>>
>>>> Thank you,
>>>> MeCoco
>>>>
>>>>
>>>>
>>>> On 11/23/2010 2:59 PM, David Watson wrote:
>>>>> Why not include both logos in your new msi and install only one
>>>>> conditionally.
>>>>>
>>>>> Dave
>>>>>
>>>>> -----Original Message-----
>>>>> From: MeCoco [mailto:vcotirl...@hotmail.com]
>>>>> Sent: 23 November 2010 13:04
>>>>> To: General discussion for Windows Installer XML toolset.
>>>>> Subject: [WiX-users] If file exists, don't update another file
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I have to do the following: if in the installation folder there is a
>>>>> specific file, eg file.txt, then a specific file, eg mylogo.jpg should
>>>>> _not_ be updated.
>>>>> The installer is doing always major upgrades.
>>>>>
>>>>> My question is: assuming that the request can be done by using a
>>>>> conditional component (not yet sure how, but this is another story)
>>>>> could I do that if in the installer I have:
>>>>> <RemoveExistingProducts After="InstallInitialize"/>? Or this won't work
>>>>> because the product is first completely removed and only then the new
>>>>> version installed, so basically the mylogo.jpg is gone as part of
>>>>> removing old products, so it won't be preserved, so the new one, the one
>>>>>
>>>>> from the package will be installed?
>>>>>
>>>>> If what I wrote above is correct, is there any other way to implement
>>>>> the above request (if in the installation folder there is a specific
>>>>> file, eg file.txt, then a specific file, eg mylogo.jpg should _not_ be
>>>>> updated) without changing the:
>>>>> <RemoveExistingProducts After="InstallInitialize"/>? (I'm not allowed to
>>>>>
>>>>> change the place of the removing old products)
>>>>>
>>>>> Thank you in advance,
>>>>> Mecoco
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>> ------
>>>>> Increase Visibility of Your 3D Game App&      Earn a Chance To Win $500!
>>>>> Tap into the largest installed PC base&      get more eyes on your game by
>>>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for
>>>>> grabs.
>>>>> http://p.sf.net/sfu/intelisp-dev2dev
>>>>> _______________________________________________
>>>>> WiX-users mailing list
>>>>> WiX-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>> SDL PLC confidential, all rights reserved.
>>>>> If you are not the intended recipient of this mail SDL requests and
>>>> requires that you delete it without acting upon or copying any of its
>>>> contents, and we further request that you advise us.
>>>>> SDL PLC is a public limited company registered in England and Wales.
>>>> Registered number: 02675207.
>>>>> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
>>> SL6
>>>> 7DY, UK.
>>> ----------------------------------------------------------------------------
>>>> --
>>>>> Increase Visibility of Your 3D Game App&      Earn a Chance To Win $500!
>>>>> Tap into the largest installed PC base&      get more eyes on your game by
>>>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for
>>> grabs.
>>>>> http://p.sf.net/sfu/intelisp-dev2dev
>>>>> _______________________________________________
>>>>> WiX-users mailing list
>>>>> WiX-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>>
>>>>>
>>> ----------------------------------------------------------------------------
>>>> --
>>>> Increase Visibility of Your 3D Game App&     Earn a Chance To Win $500!
>>>> Tap into the largest installed PC base&     get more eyes on your game by
>>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>>>> http://p.sf.net/sfu/intelisp-dev2dev
>>>> _______________________________________________
>>>> WiX-users mailing list
>>>> WiX-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>
>>>>
>>>>
>>> ----------------------------------------------------------------------------
>>> --
>>>> Increase Visibility of Your 3D Game App&     Earn a Chance To Win $500!
>>>> Tap into the largest installed PC base&     get more eyes on your game by
>>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>>>> http://p.sf.net/sfu/intelisp-dev2dev
>>>> _______________________________________________
>>>> WiX-users mailing list
>>>> WiX-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>>
>>>>
>>> ----------------------------------------------------------------------------
>>> --
>>> Increase Visibility of Your 3D Game App&    Earn a Chance To Win $500!
>>> Tap into the largest installed PC base&    get more eyes on your game by
>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>>> http://p.sf.net/sfu/intelisp-dev2dev
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Increase Visibility of Your 3D Game App&    Earn a Chance To Win $500!
>>> Tap into the largest installed PC base&    get more eyes on your game by
>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>>> http://p.sf.net/sfu/intelisp-dev2dev
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>
>> ------------------------------------------------------------------------------
>> Increase Visibility of Your 3D Game App&   Earn a Chance To Win $500!
>> Tap into the largest installed PC base&   get more eyes on your game by
>> optimizing for Intel(R) Graphics Technology. Get started today with the
>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>> http://p.sf.net/sfu/intelisp-dev2dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> Tap into the largest installed PC base&  get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to