[wix-users] Adding file to the install package
Gerhard Matzen
gmatzen at osisoft.com
Tue Aug 7 09:46:02 PDT 2018
1 file per component is a general recommendation. It does not apply to all use cases. For example you may have app1.exe and app1.exe.config that you always want to package together.
However, when the list of unversioned files grow, you run the risk that the list of files will change over time. Adding or removing files from a component breaks the component rules outlined by Microsoft, resulting in unexpected behavior for upgrades.
You can use 1 file per component for unversioned files and force them to be upgraded by setting a "fake" version with the "DefaultVersion" attribute of the File element in Wix.
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Walter Dexter via wix-users
Sent: Tuesday, August 7, 2018 9:42 AM
To: Edwin Castro <egcastr at gmail.com>
Cc: Walter Dexter <wfdexter at gmail.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Adding file to the install package
Yes I do generally want to overwrite. The modified files in my environment were typically changed by flailing support folks, and keeping their ill-concieved changes is almost never desirable.
On Tue, Aug 7, 2018 at 12:28 PM Edwin Castro <egcastr at gmail.com> wrote:
> So you usually want to overwrite unversioned files that were modified
> by a user guaranteeing you will lose their modifications? That seems bad to me.
>
> The Windows Installer knows that the proper way to update a modified,
> unversioned file is to perform some kind of migration process on the
> file and, by definition, such a process would need to be a custom
> action or should be performed by the application itself.
>
> The Windows Installer will overwrite unversioned files that have not
> been modified which is what you do want for sure.
>
> --
> Edwin G. Castro
>
>
> On Tue, Aug 7, 2018 at 9:00 AM, Walter Dexter via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
>> In my experience is thats only good advice for versioned resources.
>> If it’s a bunch of text files, Windows Installer will refuse to
>> overwrite modified files which is the opposite of what I usually want.
>>
>> > On Aug 6, 2018, at 8:49 AM, Elena Aralla via wix-users <
>> wix-users at lists.wixtoolset.org> wrote:
>> >
>> > Hi,
>> >
>> > in the WIX documentation I find written:
>> >
>> > "In general, you should restrict yourself to a single file per
>> component. The Windows Installer is designed to support thousands of
>> components in a single installer, so unless you have a very good
>> reason, keep to one file per component. Every component must have its
>> own unique GUID. Failure to follow these two basic rules can lead to
>> many problems down the road when it comes to servicing."
>> >
>> > Why?
>> > Can someone explain me well why for every file that I add to the
>> > setup,
>> it must be inserted in a component, with its own guid?
>> >
>> > Why can not I put files of the same type in a single component?
>> >
>> > Thanks so much!
>> >
>> >
>> > ___________________________________________________________________
>> > _ WiX Toolset Users Mailing List provided by FireGiant
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com
>> _&d=DwIGaQ&c=rxxrGm2iek7pTJSSe1mAiw&r=8MUQEKTKe_mBRfow6NKhbaPfXB9hL3W
>> 80bUJJehenQg&m=OB09vVf6pHJUKVv4dH6dxyNHSOkO_N_4kSSvcDcstRk&s=bxm1C_tx
>> EQ6biFDe4hqygOKp7pIu5Tuxfp9BemkkDYo&e=
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com
>> _&d=DwIGaQ&c=rxxrGm2iek7pTJSSe1mAiw&r=8MUQEKTKe_mBRfow6NKhbaPfXB9hL3W
>> 80bUJJehenQg&m=OB09vVf6pHJUKVv4dH6dxyNHSOkO_N_4kSSvcDcstRk&s=bxm1C_tx
>> EQ6biFDe4hqygOKp7pIu5Tuxfp9BemkkDYo&e=
>>
>
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwIGaQ&c=rxxrGm2iek7pTJSSe1mAiw&r=8MUQEKTKe_mBRfow6NKhbaPfXB9hL3W80bUJJehenQg&m=OB09vVf6pHJUKVv4dH6dxyNHSOkO_N_4kSSvcDcstRk&s=bxm1C_txEQ6biFDe4hqygOKp7pIu5Tuxfp9BemkkDYo&e=
More information about the wix-users
mailing list