[wix-users] Patch Creation Steps
Hoover, Jacob
Jacob.Hoover at greenheck.com
Mon Dec 4 08:02:11 PST 2017
Without your MSI source, this is just speculation…
It seems you are violating one of the component rules, where going from 1.0 to 1.1 you moved the key path of Sample.txt and didn’t change the component id. This is NOT allowed in a patch. You need to create a new component with a new GUID in 1.1, and you need to leave the existing component there. You can change the 1.0 sample.txt to a null byte file, mark it as transitive, and condition it to never install.
https://petermarcu.blogspot.com/2009/05/wix-removing-files-with-patches.html
From: Ven H [mailto:venh.123 at gmail.com]
Sent: Sunday, December 3, 2017 10:42 AM
To: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch Creation Steps
Thanks a lot, Jacob. But I have a requirement to build patches since only a couple of fixes / changes in files may have to be pushed. Also, I am trying to learn Patch from the following links.
http://petermarcu.blogspot.in/2007/06/wix-building-patch-using-new-patch_29.html
http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html
It looks like Patch works only if the file (Sample.txt in this case), is inside the Version (1.0 or 1.1) folder. What if it is nested inside another folder inside the version folder or if it is inside a different folder. Then it is throwing Object reference error during the Pyro command invocation. It will be great if anyone who has already implemented Patches successfully can also provide their inputs. I have also tried with different values for Patch Classification like Update, Service Pack, Hotfix and so on. But the behavior seems to be the same. There seems to be very less documentation on this. Also, I am wondering how to implement scenarios like Hotfix. If Patch is the answer, then yes, I have to get it working to push a couple of fixes, rather than taking the Major Upgrade route. I am not sure if this is a bug in Pyro / Torch, but somehow, I have been struggling a lot to get this working. My customer's MSI will have many files which are in predefined folders already. If they just want to deploy any one file (or two), then I am not sure how I can get it working. There only seem to be samples out there (with a single Sample text file and 2 versions) and no real world examples.
The error is given below including the Stack Trace.
pyro.exe : error PYRO0001 : Object reference not set to an instance of an object.
Exception Type: System.NullReferenceException
Stack Trace:
at Microsoft.Tools.WindowsInstallerXml.MediaRow.get_LastSequence()
at Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args) in C:\build\work\eca3d12b\wix3\src\tools\pyro\py
ro.cs:line 201
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Tools.WindowsInstallerXml.MediaRow.get_LastSequence()
at Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args) in C:\build\work\eca3d12b\wix3\src\tools\pyro\py
ro.cs:line 250
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Main(String[] args) in C:\build\work\eca3d12b\wix3\src\tools\pyro\p
yro.cs:line 92
It will be great, if anyone can please help me with this. I have been struggling with this for so many days without any success.
Regards,
Venkatesh
On Fri, Dec 1, 2017 at 11:23 PM, Hoover, Jacob <Jacob.Hoover at greenheck.com<mailto:Jacob.Hoover at greenheck.com>> wrote:
https://stackoverflow.com/questions/1405100/change-my-component-guid-in-wix
https://stackoverflow.com/questions/32142191/remove-or-rename-files-during-minor-updatewix-3-9-patch
If you don't have a solid understanding of Windows Installer, you should stick to major upgrades, auto-generated component ID's, and follow best practices.
https://www.joyofsetup.com/2008/12/30/paying-for-upgrades/
https://msdn.microsoft.com/en-us/library/windows/desktop/bb204770(v=vs.85).aspx
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>] On Behalf Of Ven H via wix-users
Sent: Friday, December 1, 2017 11:22 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Ven H <venh.123 at gmail.com<mailto:venh.123 at gmail.com>>
Subject: [wix-users] Patch Creation Steps
Hi,
I am really sorry to be asking this question again, as I am new to WiX and I am not getting much help with Patch creation. I am currently following the below link to create a Patch.
http://petermarcu.blogspot.in/2007/06/wix-building-patch-using-new-patch_29.html
If I follow it exactly like, <File Id="SampleFile" Name="Sample.txt"
Source=".\$(var.Version)\Sample.txt" />, the patch gets created. So, basically, in this case, the Sample.txt file has to be inside 1.0 and 1.1 with different content for the patch to get created. In my case, I cannot strictly follow this approach. My Sample.txt could be in a different folder with different content (say, Test/Sample.txt for version 1.0 and TestPatch/Sample.txt for version 1.1). But in this case, the Pyro command throws Object Reference error. I am finding it really difficult to debug this. So, are there any predefined folder structures to be followed for enabling patch creation? Please help.
Regards,
Venkatesh
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list