WIX MSP - Missing Version and Publisher in Control Panel - wix

I have a product MSI with version 1.1.500.0.
On top of this I have created an MSP using WIX based on a contract predefined with Manufacturer Name and Version.
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch Id="*" AllowRemoval="yes" Manufacturer="My Publisher" MoreInfoURL="www.mysite.com" TargetProductName="My Product" DisplayName="My Product Display Name" Description="My Description" Classification="hotfix">
<Media Id="12200" Cabinet="RTM.cab">
<PatchBaseline Id="RTM" />
</Media>
<PatchFamily Id="fam1" Version="1.1.9058.27799" Supersede="no"></PatchFamily>
</Patch>
</Wix>
Opening this MSP with ORCA I can see the details correctly set.
However when I install the Patch the version and publisher are blank in the "View installed updates" list from Control Panel:
From the install log:
Executing op: ProductRegister(UpgradeCode={GUID},
VersionString=1.1.500.0,,,InstallLocation=C:\MyFolder\,
InstallSource=C:\Kit\,
Publisher=My Publisher,,,,NoModify=1,,,,Contact=My Publisher,,,,EstimatedSize=75216,,,,)
Can you maybe guide me on what can I check further?
Thanks!

Related

Wix: Creating Bootstrap .exe for .msp causes original version to uninstall

I am trying to create a Wix Bootstrap executable that contains an .msp patch file. I have generated the patch file using pyro.exe and the patch itself works absolutely fine and updates the required files correctly when ran by itself.
However we package all our .msi's in a Wix Bootstrap project with a custom user interface, which I have cloned for the patch files. However when running the executable this way it removes all the files from the install directory.
Has anyone experienced this issue before or am I doing something wrong? Thank you in advance, let me know if you need further code examples.
BootstrapBundle.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:vi="http://schemas.visualinstaller.de/VisualInstallerWixExtension">
<Bundle Name="MyProgram" Version="1.0.0.1"
Manufacturer="Test"
UpgradeCode="GUID"
SplashScreenSourceFile="Resources\splash.bmp"
IconSourceFile="Resources\icon.ico">
<Update Location="http://test.laika42.com/UpdateInfo.xml"/>
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<PayloadGroupRef Id='VisualInstallerRuntimeFiles'/>
</BootstrapperApplicationRef>
<Variable Name="INSTALLFOLDER" bal:Overridable='yes'
Value='[ProgramFilesFolder]Test\MyProgram\'/>
<Chain>
<PackageGroupRef Id='NetFx45Web' /> <!-- Fails to build without this? -->
<MspPackage Id='PatchMsp' SourceFile='C:\Patches\Patch.msp' />
</Chain>
</Bundle>
</Wix>
Just had this problem myself. It seems that the UpgradeCode for the bundle must be different to the UpgradeCode for the MSI - the bundle will remove anything older with the same Bundle UpgradeCode, including the original full MSI. I have to say I find the Wix documentation less than illuminating. Bdum-tsh.
The important bits seem to be having different UpgradeCodes for the MSI, the MSI bootstrapper bundle and the patch bootstrapper bundle but keeping each one of the three the same going forward, and the RelatedBundle element.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?include $(var.SolutionDir)\Installer\ProductDefs.wxi?>
<?include $(var.SolutionDir)\Installer\version.wxi?>
<!-- A DIFFERENT UpgradeCode to the main bundle, but consistent for all patches. I think. -->
<?define PatchBundleUpgradeCode = "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"?>
<!-- The UpgradeCode of the Bundle that was used to deploy the MSI originally. -->
<?define MSIBundleUpgradeCode = "BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB"?>
<!-- ... both of which are different to the MSI UpgradeCode. -->
<Bundle Name="$(var.ProductName) $(var.ProductVersion)"
ParentName="$(var.ProductName)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.Manufacturer)"
UpgradeCode="$(var.PatchBundleUpgradeCode)"
IconSourceFile="$(var.SolutionDir)\Installer\MyIcon.ico"
AboutUrl="https://www.somecompany.com/"
HelpUrl="https://www.somecompany.com/support/"
>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.SolutionDir)\Bootstrapper\license.rtf"
LogoFile="$(var.SolutionDir)\Bootstrapper\Logo.jpg"
ShowVersion="yes"
SuppressOptionsUI="yes"
/>
</BootstrapperApplicationRef>
<OptionalUpdateRegistration Classification="Update" Name="$(var.ProductName) $(var.ProductVersion)"/>
<RelatedBundle Id="$(var.MSIBundleUpgradeCode)" Action="Patch" />
<Chain>
<MspPackage SourceFile="$(var.ProjectDir)\Release\$(var.ProductName) $(var.ProductVersion) Patch.msp" DisplayInternalUI="yes"/>
</Chain>
</Bundle>
</Wix>
Also, if you want to apply more than one minor patch, make sure your PatchMetadata element (in the patch.wxs, not the bundle.wxs) contains the following attribute otherwise the first patch will apply but subsequent ones won't.
MinorUpdateTargetRTM="1"

Wix MajorUpgrade not working, after changing UpgradeCode GUID & Version

We are using the following code in our Wix Packages.wxs file, as per the documentation we are changing the UpgradeCode GUID & Version number from. 1.0.1.0 to 1.0.2.0 but when we build and try to install the msi package it says older version is still installed and we need to uninstall it to continue.
<Product Id="8B3DFDFF-D894-4A31-AA92-824729385F15" Name="WixCodeBase" Language="1033" Version="1.0.2.0" Manufacturer="Company Name" UpgradeCode="C78D9362-A156-44A2-94D0-AFA19389FFE8">
<Package Id="*" Keywords="Installer" Manufacturer="Company Name" Description="Wix Installer" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade Schedule ="afterInstallValidate" AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id='1' Cabinet='WixPackage.cab' EmbedCab='yes' />
Installer Error
For major upgrades, you change the Product element's Id attribute not the UpgradeCode attribute. In fact, UpgradeCode attribute must remain constant across versions to use the MajorUpgrade element. MSDN has all the details.
I maintain an open source project called IsWiX that provides templates and designers to accelerate the WiX / MSI learning and development process. One of the many things these templates do out of the box is provide proper Major Upgrade support. Consider this code generated by the template:
Code Source
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!--
MSIProductVersion is defined in DesktopApplication.wixproj as 0.0.1 for local desktop builds.
You should pass in the MSBuild Property 'MSIProductVersion' to override it during an automated build.
See http://msdn.microsoft.com/en-us/library/windows/desktop/aa370859%28v=vs.85%29.aspx for information on allowable values.
The Product#Id attribute (ProductCode Property) will be a random GUID for each build. This is to support "Major Upgrades" where each install
is a seamless uninstall/reinstall.
-->
<Product Id="*" Name="DesktopApplication" Language="1033" Version="$(var.MSIProductVersion)" Manufacturer="DesktopApplication" UpgradeCode="7220a19b-ed49-4cd1-8002-6af7926441b4">
<Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="yes" />
<!-- Major Upgrade Rule to disallow downgrades -->
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<!--Common Launch Condition-->
<!-- Examples at http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html -->
<PropertyRef Id="NETFRAMEWORK40FULL"/>
<Condition Message="[ProductName] requires .NET Framework 4.0.">Installed OR NETFRAMEWORK40FULL</Condition>
<!-- Include User Interface Experience -->
<Icon Id="Icon.ico" SourceFile="Resources\Icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="Icon.ico"></Property>
<UIRef Id="UI"/>
<!-- Include Features and Directories Fragment -->
<DirectoryRef Id="INSTALLLOCATION"/>
</Product>
</Wix>
In addition to be documented in the comments, it's also discussed in the tutorials.
In a nutshell, you need to keep UpgradeCode the same and randomize ProductCode.

WIX: How to display "Publisher" info in "Programs and Features" -> "Installed Updates"

I am responsible for creating several MSI's and their MSP's. I installed all of them using the MSI's, and my company name was displayed correctly, i.e. under "Programs and Features". However, after I installed their updates using the MSP's, I found their "Publisher" columns in "Programs and Features" -> "Installed Updates" were blank for some of the products, while some of them had my company name.
I am so surprised after seeing those blank publishers because I always use the following Patch.wxs as a template and add componentRef's:
<?xml version="1.0" encoding="UTF-8"?>
<?include ..\PatchVersion.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch AllowRemoval="yes"
Manufacturer="MyCompany"
MoreInfoURL="http://www.mycompany.com/"
DisplayName="My Studio Patch1"
Description="My Studio Patch1"
Classification="Update Rollup"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM" ><Validate ProductId='no' ProductVersionOperator='LesserOrEqual'/></PatchBaseline>
</Media>
<PatchFamilyRef Id="MyStudio_1_Rollup"/>
</Patch>
<Fragment>
<PatchFamily Id='MytStudio_1_Rollup' Version='$(env.PATCH_VERSION)' Supersede='yes'>
<ComponentRef Id="..." />
</PatchFamily>
</Fragment>
</Wix>
I thought Patch/#Manufacturer is the one for the publisher column. Can anyone help me?

Wix Patch- On uninstallation of patch Restart of system dialog is popped up

I have been generating the patch file by comparing the older version and newer version pdb files.
The patch file (msp) is installed successfully and the Restart of system dialog is not popped up.
On uninstallation of patch restart of system dialog is popped up.
Please let me know how I can restrict restart of system dialog on uninstallation.
Patch file
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="Test"
MoreInfoURL="http://www.test.com/"
DisplayName="Patch 1.0.1"
Description="Patch"
Classification="Update"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM">
<Validate ProductId="no" />
</PatchBaseline>
</Media>
<PatchFamilyRef Id="PatchFamily"/>
</Patch>
<Fragment>
<PatchFamily Id='PatchFamily' Version='1.0.1' Supersede='yes' >
<!--<ComponentRef Id="C__F12B37CBEAE157D538B2BAC1CF30713C"/>
<ComponentRef Id="C__3430F83A3728AE39FA075656EBFCA0BD"/>-->
</PatchFamily>
</Fragment>
</Wix>
There is a property that does this, but I am not sure if it works with a Patch or not.
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" />
That should get done what you are trying to do. Let me know if you have other questions about it.

WIX - Is it possible to create a language neutral patch for multiple MSI?

We have the multiple MSI's for the different languages, so each MSI has its own ProductCode and UpgradeCode. Using English MSI's, we created a patch using Aaron's approach in http://blogs.msdn.com/astebner/archive/2007/10/26/5700191.aspx, e.g. candle / light / torch / pyro
with the following Patch.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="xxx"
MoreInfoURL="xxx"
DisplayName="MyProduct First Patch"
Description="My Product First Patch"
Classification="Update Rollup"
>
<Media Id="5000" Cabinet="RTM.cab" >
<PatchBaseline Id="RTM"/>
</Media>
<PatchFamilyRef Id="PatchFamilyRollup"/>
</Patch>
<Fragment>
<PatchFamily Id='PatchFamilyRollup' Version='1.1.1.1' Supersede='yes'>
...
However, when we apply this patch on the machine where non-English MSI was installed, we get the following error:
"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."
So my question is,
is it possible to create a patch (MSP) that can be used on any language?
If so, what needs to be done?
I think you should experiment with the Validate element, which is a child of PatchBaseline, and the validation flags of torch.exe command line. The right combination of bits will let you install your patch.
Thanks Yan for giving me a right direction. I played with "Validate" element and "torch" command quite a few hours, but I got the same error. Then my co-worker showed me "TargetProductCode" element. After a few trials, I finally made it work although the solution isn't purely language-neutral. The answer I found is a combination of "Validate" element and "TargetProductCode" element. I am posting my own answer so that someone may get benefit out of it.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="xxx"
MoreInfoURL="xxx"
DisplayName="MyProduct First Patch"
Description="My Product First Patch"
Classification="Update Rollup"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM" >
<Validate ProductId='no' ProductLanguage='no' ProductVersionOperator='LesserOrEqual' UpgradeCode='no' />
</PatchBaseline>
</Media>
<TargetProductCodes Replace='yes'>
<!-- list all language specific ProductCode here. -->
<TargetProductCode Id='{xxxxx}' /> <!-- ProductCode for English -->
<TargetProductCode Id='{yyyyy}' /> <!-- ProductCode for French -->
</TargetProductCodes>
<PatchFamilyRef Id="PatchFamilyRollup"/>
</Patch>
...