As you've found there is no way to "rename" a file. The only option is to
"delete" then "add". Delete is very difficult (as detailed by Peter). Add
means you must create a new Component.

These operations are very difficult to do via a patch. Can you wait until
the next major upgrade of your product? That would be easier. I'm not sure
that a custom action would get you the right behavior in all cases,
particularly around patch uninstall.

On Fri, Feb 5, 2010 at 4:34 PM, Lian Jiang <lji...@microsoft.com> wrote:

> Hi,
>
> I am using Pyro.exe to make a patch. When I change the Name and Source
> attributes of a file (KeyPath='yes'), Pyro threw error "Patches cannot
> change the keypath of a component." This behavior is confirmed by
> http://blogs.msdn.com/pmarcu/archive/2007/06/28/sample-patch.aspx:
>
> "The first error you got was accurate. You cannot change the keypath file
> of a component using a patch. This means you cannot delete the file either
> because the presence of the file is what dictates whether the component is
> installed. If you want to remove a keypath file, you need to remove the
> entire component which means you need to remove the entire feature that
> contains it. Its better just to leave the file there." - Petermarcu<
> http://blogs.msdn.com/pmarcu>
>
> Since the component consists by only that file, I tried to remove this
> component to see whether Pyro works. Unfortunately, it complains "Removing
> component is not supported". I think this is also expected according to
> above quote.
>
> So the only ways left are:
> Solution 1: add a new file while keep the old file.
> Solution 2: add a new file and remove the old file using a custom action.
>
> What are your experience of renaming a file using a pyro patch? Any better
> way?
>
> Thanks
> Lian
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


-- 
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to