[wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
Hoover, Jacob
Jacob.Hoover at greenheck.com
Wed Feb 6 09:13:49 PST 2019
What the justification for the Condition on your component? How is the DLLINSTALLED property being set?
My gut feeling is you added a bunch of authoring you don't need, as a bare minimum Component with a file as the keypath should "just work" and Windows Installer should do the right thing.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Sebastian, ChinchuX via wix-users
Sent: Tuesday, February 5, 2019 10:14 PM
To: Blair Murri <osito at live.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Sebastian, ChinchuX <chinchux.sebastian at intel.com>
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
Do you ever explicitly set REINSTALLMODE?
No
What values do you set on <MajorUpgrade/>?
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Do any of your components contain more than one file?
Yes
Do any of your components containing a file have its KeyPath set to anything else (either on the Component itself or via any child of that component)?
My DLL component is defined like this:
<Property Id="DLLINSTALLED" >
<DirectorySearch Id="DLLVersion" Path="[HWAPIDIR]">
<FileSearch Name="test.dll" MinVersion="10.0.0"/>
</DirectorySearch>
</Property>
<Component Id="HWAPIDLL" Guid="18a81c9e-726b-4867-ae07-5bf357bc8188" Shared="yes" Win64="yes" >
<Condition><![CDATA[NOT DLLINSTALLED]]></Condition>
<File Id="testdll" Name="test.dll" Source="Drivers\SHA2\x64\test.dll" />
<RemoveFolder Id="HWAPIDLL" Directory="HWAPIDIR" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Intel\Intel(R) System Scope Tool" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component>
Are you doing either Small Updates or Patching, or only Major Upgrades?
Both small updates and Major upgrades are doing
How do you set your ComponentCodes? Are you doing Harvesting in your build?
No I am not harvesting in build
Do any of your MSIs contain Merge Modules?
No
Thanks & Regards,
Chinchu
From: Blair Murri [mailto:osito at live.com]
Sent: Tuesday, February 5, 2019 11:54 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>; Sebastian, ChinchuX <chinchux.sebastian at intel.com>
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
Do you ever explicitly set REINSTALLMODE?
What values do you set on <MajorUpgrade/>?
Do any of your components contain more than one file?
Do any of your components containing a file have its KeyPath set to anything else (either on the Component itself or via any child of that component)?
Are you doing either Small Updates or Patching, or only Major Upgrades?
How do you set your ComponentCodes? Are you doing Harvesting in your build?
Do any of your MSIs contain Merge Modules?
Certain combinations of the answers to the above questions can cause the symptoms you report.
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: Sebastian, ChinchuX <chinchux.sebastian at intel.com<mailto:chinchux.sebastian at intel.com>>
Sent: Tuesday, February 5, 2019 4:51:00 AM
To: Blair Murri; WiX Toolset Users Mailing List
Subject: RE: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
Thanks Blair Murri for the answer.
The reason Why I kept the file as permanent is I need to upgrade the file, if the latest version is available.
If we did not keep file as permanent, version upgrade was not happening, highest version of file was removing at the time of major and minor upgrade of packages.
Could you please suggest any method to keep files as shared and not remove the files at the time of uninstallation/upgrade of packages depending upon any checking condition.
Thanks & Regards,
Chinchu
From: Blair Murri [mailto:osito at live.com]
Sent: Monday, February 4, 2019 5:16 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Sebastian, ChinchuX <chinchux.sebastian at intel.com<mailto:chinchux.sebastian at intel.com>>
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
That's what permanent means. The component can be serviced (you can update it) but it won't ever be removed.
The right way to deal with a file that is shared across various packages (and is installed to the same location) is to ensure that the component GUID matches for that file in every package (and don't set permanent). That way, no matter the order of installations, upgrades/updates, and removals, the file will always be there whenever any of the packages are installed and removed when the last one is removed.
The only other attribute to use for that component is to additionally add SharedDllRefCount, but that is only to be used when the same file is also installed by non-MSI installers that use the SharedDlls registration scheme that predates MSI itself.
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> on behalf of Sebastian, ChinchuX via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Sent: Sunday, February 3, 2019 9:39:44 PM
To: WiX Toolset Users Mailing List
Cc: Sebastian, ChinchuX
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
Hi Christopher/Dexter,
Thanks for the update.
I had tried the method suggested by Walter Dexter and got the result as well.
But I defined the component which installs DLL as permanent to overcome the uninstallation and upgrade of packages because that DLL might be used by some other packages as well.
The problem which I am facing now is, the permanent component is not deleting after the uninstallation of all packages.
Is there any method to solve the issue, like we can check any condition which works only on uninstallation of packages or Any method which can able to check the status of a file existence at the time of only uninstallation of packages and change the status of components from permanent to temporary?
Thanks in advance.
Thanks & Regards,
Chinchu
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Christopher Painter via wix-users
Sent: Saturday, February 2, 2019 6:55 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Christopher Painter <chrpai at iswix.com<mailto:chrpai at iswix.com>>
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
What language is your application written? Are the DLL's "registered"? Does your language have some form of late binding?
The only tolerable way I can see out of this sticky mess would be something like:
1) Install these shared dll's to a folder structure that allows all of them to be installed side by side in unique subfolders. This is because they don't follow the component rules and are really distinct components. Any MSI containing the shared components would follow standard default file versioning and component rules for each DLL but because there are distinct components the latest version of each flavor of the DLL would be available in it's own unique folder and or file name.
2) Shift the business logic of which of these DLLs to load to the application runtime. For example in .NET you could use some dependency injection to decide that DLL A is the one to be loaded.
3) The components should all get uninstalled when the last MSI is uninstalled because all component rules / reference counting are being followed.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> on behalf of Walter Dexter via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Sent: Friday, February 1, 2019 12:11 PM
To: WiX Toolset Users Mailing List
Cc: Walter Dexter
Subject: Re: [wix-users] How can I conditionally overwrite DLLs during WIX installation of different packages?
So, if it's at version 2, install version 4, but if it's at 3, install 5, just for example?
I completely agree it's madness, but I'd think you could achieve it with some combination of properties driven by a FileSearch and components controlled by conditions. Haven't tried it though.
It's only going to get worse if you go down this path, you're going to wind up with a mess in another couple generations of releases.
On Thu, Jan 31, 2019 at 4:15 AM Sebastian, ChinchuX via wix-users < wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>> wrote:
> 1. Hi All,
> 2. Could you please help me to find a way for conditionally
> overwrites a DLL depending up on the version of it .
> 3. Create a dummy dll with different version number. Build the that
> dlls with different Wix installation packages.
> 4. Check for upgrade of dlls with multiple installers.
> 5. Make sure that dll gets uninstalled when the last tool is
> uninstalled.
> Thanks & Regards,
> Chinchu
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.
More information about the wix-users
mailing list