[wix-users] Issues with Component with Auto Generated GUID

Ven H venh.123 at gmail.com
Fri Mar 23 09:54:29 PDT 2018


Thanks a lot for the details, Chris. But unfortunately, this is the current
state of affairs. So, it would be really great, if you could please let me
know if there is any way to achieve what I am looking for.

Regards,
Venkatesh

On Fri, Mar 23, 2018 at 7:31 PM, Christopher Painter <chrpai at iswix.com>
wrote:

> Having multiple files in a single component isn't an automatic component
> rule violation.   However grouping an .exe and .exe.config in one component
> may or may not give you the desired  file overwriting behavior as the
> decision will be based on the keyfile which presumably is the .exe file.
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/
> aa370561(v=vs.85).aspx
>
> For config files, I prefer to have one file that is "owned' by the
> installer (stock can always overwrite and will never contain user data )
> and one file created by the application that contains the user data.   The
> installer can't harm what it doesn't know about.   If you are coding in
> .NET,  the framework has a pattern to easily support this.   The main
> config file can reference the  custom (override) config file and seamlessly
> apply the settings if they are found.
>
> https://msdn.microsoft.com/en-us/library/aa903313(v=vs.71).aspx
>
> appsettings at file attribute
>
> https://docs.microsoft.com/en-us/dotnet/framework/data/
> adonet/connection-strings-and-configuration-files
>
> connectionstring at configsource attribute
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Ven H via wix-users
> Sent: Friday, March 23, 2018 6:40 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Ven H <venh.123 at gmail.com>
> Subject: [wix-users] Issues with Component with Auto Generated GUID
>
> I have an MSI which has a component with 4 files (agreed that this
> violates component rules. But my client was unaware of the best practices
> and had implemented it in that way some time ago). They have also
> configured auto generated ID (*) for the Component GUID (again this may not
> be the best thing to do, but they have done it).
>
> Of the 4 files, one will be a config file. So, once it is installed at
> their end customer, their end customer can manually modify this config to
> suit to their environment. Now we are working on an Upgrade. In this, they
> don't want to touch the already installed config file at the target even
> though it is modified in the MSI, but other modified files should get
> updated / overwritten.
>
> So, I suggested them to include a MajorUpgrade element with
> Schedule="afterInstallExecute". But even with this, the config file also
> seems to be getting overwritten with the installation of the upgrade MSI,
> probably because the Component GUID is auto generated (*) all the time. In
> fact, I tried it out in a sample and could observe that if the component
> GUID is different, no files are getting installed during upgrade, although
> this is strange.
>
> If I keep the Component GUID constant, then I believe it will work as
> expected. But, is it possible to achieve this requirement with an auto
> generated Component GUID everytime? Please suggest if there is a good
> solution / workaround.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list