I have a patch (MyPatch.msp) which updates a .NET application from version 6.13.7604 to 6.14.7605
If I run the following command
msiexec /update MyPatch.msp
it shows the installation dialog boxes, progress indicators, including "Copying new files", "Patching files" etc. for the patch, everything runs fine and it updates the application.
However I want to run the patch in quiet mode.
msiexec /update MyPatch.msp /qn
It runs in quiet mode alright, but it doesn't update the application files. However, if I check the application the Control Panel, it has updated the version number to 6.14.7605. But the Product Version in the application's .exe file is still at 6.13.7604 (and it doesn't have the new functionality)
The same happens if I try any of the levels of UI other than /qf (the default) or use /passive.
If I have it create a log, I don't see any error messages and at the bottom it appears to have been successful:
MSI (s) (D0:94) [12:17:57:277]: Product: MyProduct -- Configuration completed successfully.
MSI (s) (D0:94) [12:17:57:277]: Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 6.14.7605. Product Language: 1033. Manufacturer: MyCompany. Reconfiguration success or error status: 0.
Likewise, the Event Log has an entry indicating success...
Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 6.14.7605. Product Language: 1033. Manufacturer: MyCompany. Reconfiguration success or error status: 0.
Why is it not updating the files in quiet / passive mode?
Edit
(adding info in response to comment)
It's a massive application and the actual code change is immaterial (just a resx string change for the purpose of testing patching).
Also, this line was modified in AssemblyInfo.cs:
[assembly: AssemblyInformationalVersion("6.14.7605")]
However, the PCP file and line used to generate the patch may be useful:
Command used to create the msp file:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\msimsp.exe" -s "setup\MyApplication\Patch\MyPatch.pcp" -p "C:\agent\_work\38\a\Archive\LauncherPatch.msp" -l MyPatch.log
Further update
Here are the log entries relating to the component failing to update both with and without quiet mode (the latter of which works fine) As you can see there is one extra line relating to this component's guid but I don't understand what the difference means.
Quiet Mode:
ComponentRegister(ComponentId={B02BFA02-FEBE-4965-A07A-0150C44CDA7C},KeyPath=C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
MSI (s) (34:F4) [08:34:45:166]: WIN64DUALFOLDERS: Substitution in 'C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe' folder had been blocked by the 1 mask argument (the folder pair's iSwapAttrib member = 0).
Without quiet mode (files update correctly):
ComponentRegister(ComponentId={B02BFA02-FEBE-4965-A07A-0150C44CDA7C},KeyPath=C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
1: {33250B4C-B2D2-4F36-AB12-D5FF0757C973} 2: {B02BFA02-FEBE-4965-A07A-0150C44CDA7C} 3: C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe
MSI (s) (34:50) [08:37:23:282]: WIN64DUALFOLDERS: Substitution in 'C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe' folder had been blocked by the 1 mask argument (the folder pair's iSwapAttrib member = 0).
The component guid is mentioned once more later in the log but the entries are almost identical for both attempts:
MSI (s) (34:F4) [08:34:45:812]: Executing op: RegisterSharedComponentProvider(PatchGUID={66911576-86A6-4A9C-AF86-9370E40E09EA},MediaCabinet=#PCW_CAB_LnchApps,File=MyApp.exe,Component={B02BFA02-FEBE-4965-A07A-0150C44CDA7C},ComponentVersion=1.0.0.0,ProductCode={33250B4C-B2D2-4F36-AB12-D5FF0757C973},ProductVersion=6.13.7604,PatchSize=554,PatchAttributes=0,PatchSequence=10006,SharedComponent=0,IsFullFile=0
MSI (s) (34:50) [08:37:24:238]: Executing op: FileCopy(SourceName=MyApp.exe,SourceCabKey=MyApp.exe,DestName=MyApp.exe,Attributes=0,FileSize=422400,PerTick=65536,,VerifyMedia=1,,TotalPatches=1,,,CheckCRC=0,Version=1.0.0.0,Language=0,InstallMode=327680000,,,,,,,)
MSI (s) (34:50) [08:37:24:242]: File: C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe; Patch targets existing file.; Smart patch; Existing file is of an equal version
... the only difference being "InstallMode" - it's 327417856 in the quiet attempt and 327680000 in the successful attempt.
I did just notice "Existing file is of an equal version" ... but it isn't! Besides this also appears when not running in quiet mode and then the file is replaced...
But wait!
In the quiet mode log, I found this (emphasis mine):
MSI (s) (64:0C) [09:05:12:910]: Executing op: CacheBaselineFile(Baseline=0,FileKey=MyApp.exe,FilePath=C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe,,Existing=0)
MSI (s) (64:0C) [09:05:12:911]: Executing op: PatchApply(PatchName=MyApp.exe,TargetName=C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe,PatchSize=554,TargetSize=422400,PerTick=0,,FileAttributes=0,PatchAttributes=0,CheckCRC=0)
MSI (s) (64:0C) [09:05:12:912]: Skipping all patches for file 'C:\Program Files (x86)\MyCompany\MyApplication\MyApp.exe'. File does not need to be patched.



