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

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?

Related

WIX MSP - Missing Version and Publisher in Control Panel

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!

Wix - installing patches without admin rights

Following is the wxs file for the main installer. This will be signed with Sign.pfx after it is created.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD"
Name="WiX Patch Example Product"
Language="1033"
Version="1.0.0"
Manufacturer="Dynamo Corporation"
UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
<Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="200"
Compressed="yes" AdminImage="no" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
<FeatureRef Id="SampleProductFeature"/>
<PatchCertificates>
<DigitalCertificate Id="MyNewCertificate" SourceFile="Sign.pfx"/>
</PatchCertificates>
<PackageCertificates>
<DigitalCertificate Id="MyNewCertificate" SourceFile="Sign.pfx"/>
</PackageCertificates>
</Product>
<Fragment>
<Feature Id="SampleProductFeature" Title="Sample Product Feature" Level="1">
<ComponentRef Id="SampleComponent" />
</Feature>
</Fragment>
<Fragment>
<DirectoryRef Id="SampleProductFolder">
<Component Id="SampleComponent" Guid="{C28843DA-EF08-41CC-BA75-D2B99D8A1983}" DiskId="1">
<File Id="SampleFile" Name="Sample.txt" Source=".\$(var.Version)\Sample.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="SampleProductFolder" Name="Patch Sample Directory">
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
Following is the patch file which needs to be installed without requiring admin rights.Currently the patch works fine but requires admin rights.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="Dynamo Corp"
MoreInfoURL="http://www.dynamocorp.com/"
DisplayName="Sample Patch"
Description="Small Update Patch"
Classification="Update"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM"/>
</Media>
<PatchFamilyRef Id="SamplePatchFamily"/>
</Patch>
<Fragment>
<PatchFamily Id='SamplePatchFamily' Version='1.2.0.0' Supersede='yes' ProductCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
<ComponentRef Id="SampleComponent"/>
</PatchFamily>
</Fragment>
</Wix>
The example code was taken from the official wix tutorial at http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html
How can I make it so that the application is installed for all users (with admin rights) (currently done) but non-admins can install the patch file.
What I've tried: added the PatchCertificates and PackageCertificates. Makes no difference.
Most of the examples I can find use a .cer file instead of a .pfx for a PatchCertificates/DigitalCertificate/#SourceFile (e.g. Question about UAC patching on Vista-patch certificate is not recognized which includes alternate directions for creating a .cer from a .pfx if you don't have one already, leveraging MsiGetFileSignatureInformation.) It's possible you need to specify a .cer file instead.

ComponentGroupRef not working with WiX library

I created a library in WiX with a single ComponentGroup, Component and File, this way:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="MyComponentGroup" Directory="WindowsFolder">
<Component Id="MyComponent" Guid="...">
<File Id="MyFile" Source="file.txt" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Then I created a WiX project, added a reference to this library (as a project reference) and I'm using this code:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="My Product" Language="1033"
Version="1.0.0.0" Manufacturer="Myself"
UpgradeCode="xxxxx">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Feature Id="Feature_Product" Title="Main Product"
Level="1" Absent="disallow" Description="Core functionality.">
<ComponentGroupRef Id="MyComponentGroup" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WindowsFolder" />
</Directory>
</Fragment>
</Wix>
But I'm receiving an error of Unresolved reference. Is there anything I'm missing? Or do libraries only work with UI and not files?
EDIT:
I added the complete code.
And it works if I use a FeatureRef and I move the Feature to the library, but I would like to keep the Feature in the main project and only have the Component in the library.
You haven't posted your entire error, but the error I get when using your example is:
Unresolved reference to symbol 'Media:1' in section 'Fragment:'
The unresolved reference is a missing media element; the File needs to be stored in a cabinet and it defaults to File/#DiskId="1" which is why it's looking for "Media:1". You need to tell WiX where to store the installation files. If you're using WiX 3.7, add this into your <Package> element:
<MediaTemplate EmbedCab="yes" />
If you're using an earlier version:
<Media Id="1" Cabinet="Cab1.cab" EmbedCab="yes" />

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.

patching using purely WIX

I am struggling with creating a patch purely using WIX and I was hoping if someone could guide me in the right direction.
I have a few hundred source files and I run heat against them to create a harvest file followed by creating a package using candle and light.
I need to change a few configuration files and I create a 2nd package with the changes.
Using Torch and pyro I create the .wixmst file and then when trying to create the msp file, pyro complains with the following error.
pyro.exe : error PYRO0252 : No valid transforms were provided to attach to the patch. Check to make sure the transforms you passed on the command line have a matching baseline authored in the patch. Also, make sure there are differences between your target and upgrade.
my question really is: what should patch.wxs contain?
Here is what my patch.wxs looks like:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="sample llc"
MoreInfoURL="sample.com"
DisplayName="Env Patch"
Description="Env Specfic Patch"
Classification="Update"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM" />
</Media>
<PatchFamilyRef Id="EnvPatchFamily" />
</Patch>
<Fragment>
<PatchFamily Id='EnvPatchFamily' Version='1.0.0.0' ProductCode="PUT-GUID-HERE" Supersede='yes' >
**********************************************
What component Ref should I put in here
heat creates a component group and I can't
put ComponentGroupRef in here
**********************************************
</PatchFamily>
</Fragment>
</Wix>
I am using Wix patching as described in this link:
http://wix.sourceforge.net/manual-wix3/wix_patching.htm
However, it doesn't consider source wix file created using heat.
Can someone tell me what am I doing wrong here?
Hitesh,
For me heat creates a component group like this:
<Fragment>
<ComponentGroup Id="MyFiles">
<ComponentRef Id="cmp2AA1A30564C621322ECB3CDD70B1C03C" />
<ComponentRef Id="cmp788C978F16E473D4FD85720B5B75C207" />
</ComponentGroup>
</Fragment>
heat command:
"%WIX%\bin\heat.exe" dir slndir\bin\Release -cg MyFiles -gg -scom -sreg -sfrag -srd -dr INSTALLDIR -out ..\Wix\MyFiles.wxs -var var.BinOutputPath -nologo -v -ke -t wixtransform.xsl
And in patch.wxs:
<Fragment>
<PatchFamily Id='ProductPatchFamily' Version='1.3.0.0' Supersede='yes'>
<ComponentRef Id="cmp2AA1A30564C621322ECB3CDD70B1C03C" />
<ComponentRef Id="cmp788C978F16E473D4FD85720B5B75C207" />
</PatchFamily>
</Fragment>
Take care: there is no ProductCode attribute in PatchFamily tag
I would also like to mention that PatchFamily elements are optional when building a patch, and are intended to allow fine grained control over exactly what will get patched. In most cases I find that I want to include all differences between 2 versions of an MSI when building a patch, in which case I omit the PatchFamily altogether. In your case, the resulting patch WXS would look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="sample llc"
MoreInfoURL="sample.com"
DisplayName="Env Patch"
Description="Env Specfic Patch"
Classification="Update"
>
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM" />
</Media>
</Patch>
</Wix>
I hope this answer helps anyone with a similar question, that is not wanting to manually construct patch families, not wanting to manually includeComponentRef every time they need to build a patch.
I faced the same issue, the fix for this error is to add the GUID to the component and it should remain same for both the versions of msi.
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="WixPatch" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="WixPatch" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER" >
<Component Id="File1" **Guid="3A64BE7A-BBEC-40AD-8319-45C602734146"**>
<File Source="D:\V2\File1.txt" Name="File1" KeyPath="yes" DiskId="1" Id="F1"/>
</Component>
</ComponentGroup>
</Fragment>