The file says 2.7.1, Windows says 2.7.0, and both are telling the truth
At 16:58:35 UTC on November 5, the Attestree agent on a Windows 11 Hyper-V test VM in our lab upgraded Dolt from 2.7.0 to 2.7.1 and recorded the upgrade as succeeded. Dolt is DoltHub’s database. Its winget package, DoltHub.Dolt, is a WiX-built MSI installed for the whole machine.
At 16:59:45, about 70 seconds later, the Hyper-V host reset without shutting down. Windows logged Kernel-Power 41 and event 6008, and the VM went down with the host.
When the VM came back, dolt.exe version printed 2.7.1, and Programs and Features said 2.7.0.
Dolt and DoltHub did nothing wrong here. Any MSI that loses power partway through an install can end up like this.
The timeline
All times are UTC.
| Time | What happened |
|---|---|
| 16:58:35 | The agent records the Dolt 2.7.0 to 2.7.1 upgrade as succeeded. |
| 16:59:45 | The Hyper-V host resets without shutting down. The VM goes with it. |
| 19:03:48 | After the reboot the agent sees 2.7.0 and tries the upgrade again. It fails. |
| 19:04:39 | Second try. Same failure. |
| 19:13:56 | Third try. Same failure. |
| 19:14:49 | Fourth try. Same failure. The agent’s install-failure backoff holds further tries. |
| 19:17:41 | We press “replace” in the console. It says “removing the copy”. |
| 19:26:27 | The removal finally runs, and fails within the same second. |
Files at 2.7.1, registration at 2.7.0
C:\Program Files\Dolt\bin\dolt.exe versionprinteddolt version 2.7.1.- Programs and Features, and the Windows Installer registration behind it, still said “Dolt 2.7.0”, product code
{20AD205C-9EC9-4BFB-9462-B2AE5A1D7295}. - The 2.7.0 product’s
LocalPackage, the copy of its package that Windows Installer keeps inC:\Windows\Installer, wasdbfc81e.msi. It no longer existed. The 2.7.1 install had deleted it. - 2.7.1’s own cached package,
10b2a41.msi, was inC:\Windows\Installerwith nothing registered for it. Its product code is{04A4E5F9-2111-4D47-948F-40791BBF6B09}. - The Application event log had no MsiInstaller entries for the 16:58 upgrade at all.
The file changes had reached the disk. The registry changes had not. dolt.exe reports the binary that is on disk, and Programs and Features reports what Windows Installer has registered, so each one is accurate about its own half of a torn install.
Why every try failed the same way
The agent reports what Windows reports. Windows said 2.7.0, so the agent planned the upgrade again. The 2.7.1 MSI does a major upgrade, which removes the old product first, and every try stopped at that step:
Error 1714. The older version of Dolt 2.7.1 cannot be removed. Contact your technical support group. System Error 1612.
Then came exit code 1603, which winget reports as 0x8A150049.
The message reads oddly, because the name in it is the incoming package’s. The product it could not remove was 2.7.0. System Error 1612 is ERROR_INSTALL_SOURCE_ABSENT. To remove a product, Windows Installer needs that product’s package, and the cached one was the dbfc81e.msi the upgrade had already deleted. Retrying could not change that.
The replace that removed nothing
Attestree’s “replace” action is for a box whose copy of an app has gone wrong. It removes the copy on the box, confirms it is gone, then installs the verified installer. We pressed it at 19:17:41.
For the next nine minutes the console said “removing the copy”. The agent had removed nothing. It was holding the replace behind the backoff left by the failed upgrade.
At 19:26:27 the removal ran. winget’s uninstall opened a Windows Installer transaction on the 2.7.0 product and closed it in the same second. Nothing was removed, and winget answered 0x8A150030. The replace moved to “removal failed, backing off”. It retries in 6-hour windows and flags the box for the operator on the third failure. It did not install 2.7.1 beside the copy it could not remove, which is correct.
What we got wrong
- “Succeeded” was true for about 70 seconds.
- The agent retried an upgrade that could not work, four times.
- The console said only “upgrade failed”. It showed neither the 1714 nor the 1612.
- For nine minutes the console said “removing the copy” while nothing was being removed.
- Our first release of the fix did not work on a real machine. The section on the second run says why.
The hard part is the file
Getting a box out of this state by hand takes three commands, listed under “Doing it by hand” below. The file they need is harder to come by. It has to be the exact original installer, with the same package code, byte for byte. winget deleted its copy minutes after the install, the vendor may have pulled the release since, and a rebuilt MSI will not match.
Attestree kept a verified copy of the exact 2.7.0 installer it shipped to this VM, the same file that was installed (sha256 starting 6b9678422ef7). The fix uses that copy:
- Before it removes an MSI copy, the agent checks two things: that Windows’ cached installer for that product still exists, or else that a source the product registered still holds the package.
- If neither does, the agent puts the verified original in a folder only SYSTEM can write to, under the name Windows expects. It registers that folder as a source for the product and runs the normal removal. Then the replace installs the new version. For the operator it is the same single replace button. Afterwards the agent deletes the folder it staged.
- If no verified copy of the original exists, the replace says so in plain words at once, instead of three tries in 6-hour windows before the box is flagged.
The replace, on the same VM
The fix first shipped in Attestree 26.11.600 on November 6. On November 7 we ran the replace on the same torn VM, and it failed the old way, with 0x8A150030. The agent’s own warning said why:
System.EntryPointNotFoundException: Unable to find an entry point named 'MsiSourceListEnumSourcesExW' in native library 'msi.dll'.
To read a product’s registered sources, the agent called a Windows Installer function that does not exist. The real one is MsiSourceListEnumSourcesW, and it already takes the extra arguments the agent passed.
- The call threw, so the agent treated the sources as unknown and went on to the removal that cannot work.
- The check that should have said so at once failed the same way, because it reads the same sources.
- Our unit tests drove that code through a stand-in for Windows, so none of them ever made the real call.
Our release notes for 26.11.600 said the replace could recover this case. It could not.
We renamed the call. We also added a test that loads every Windows function the agent imports and fails the build if one does not exist. Both shipped in 26.11.701 the same morning.
The second run, on 26.11.701 (all times UTC):
| Time | What happened |
|---|---|
| 12:56:58 | The agent finds the 2.7.0 product’s cached installer missing. It puts the verified original in a SYSTEM-only folder, under the name Windows expects, and registers that folder as the product’s source. |
| 12:57:06 | Windows Installer: “Removal completed successfully” for Dolt 2.7.0, status 0. |
| 12:57:17 | Windows Installer installs Dolt 2.7.2, status 0. By then the VM’s named version was 2.7.2. |
Afterwards:
- Programs and Features listed only Dolt 2.7.2, and
dolt.exe versionprinted 2.7.2. - The 2.7.0 registration and its source list were gone.
- The agent had deleted the folder it staged.
Nobody repaired the VM by hand.
The run also took almost three hours longer than it needed to, and that was our fault too.
- The withdrawal ran the doomed upgrade. To issue the replace again, we withdrew the old one first. The withdrawal woke the agent, and it ran the plain upgrade twice before the new replace arrived. Both failed the old way, and the install-failure backoff they opened held the new replace until we restarted the agent.
- The new replace inherited the old one’s failure. It took over the old replace’s 6-hour removal window, and the console showed the old replace’s failure as its own. So it waited until 12:43, and the agent ran it at its next check-in.
Both fixes shipped in 26.11.800, with its new agent. A replace is no longer held by the backoff of the upgrade it exists to fix, and each replace keeps its own removal window.
Doing it by hand
Everything in this section assumes you still have the exact original MSI. If you do, this is what we tested on the torn VM, as SYSTEM. None of it needs Attestree.
First, make sure it is this failure. The signature is Error 1714 together with System Error 1612. Compare the version the app reports about itself with the version in Programs and Features. If they differ, open
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<packed product code>\InstallProperties
and check whether the file named in its LocalPackage value exists. The packed code reverses the GUID’s first three groups and swaps the two characters of each byte in the last two. For Dolt 2.7.0 it is C502DA029CE9BFB449262BEAA5D12759.
The usual advice is to run msiexec /x on the original MSI. We tried that with a file whose sha256 matched the installed one exactly, and it failed with the same 1612. For a product that is already installed, Windows Installer ignores the path you give it and looks only in the product’s registered source list. Ours held winget’s temporary download folder, which winget deletes after every install, and the file name winget had given the download, 6b9678422ef7…ec79b2.msi. That name is the PackageName value under HKLM\SOFTWARE\Classes\Installer\Products\<packed product code>\SourceList.
This worked, with exit code 0, “Removal completed successfully”, and both the Programs and Features entry and C:\Program Files\Dolt gone:
-
Put the original MSI in a folder that only SYSTEM and Administrators can write to, under the name in
PackageName. -
Add that folder to the product’s source list. In code that is
MsiSourceListAddSourceEx; from PowerShell:(New-Object -ComObject WindowsInstaller.Installer).AddSource('{20AD205C-9EC9-4BFB-9462-B2AE5A1D7295}', '', 'C:\path\to\folder\') -
Run the normal removal:
msiexec /x {20AD205C-9EC9-4BFB-9462-B2AE5A1D7295}.
The other way out is to recreate the original source folder and put the file back under its registered name. Either way, keep ordinary users from writing to that folder, because the removal runs from it with full rights.
After this test we put the VM back from a checkpoint, so the fix could be tried on the same torn VM. That run is the section above.
In the tools we ran before, this was a project
In Intune and Altiris, the tools we ran fleets with before, getting a box out of a state like this was a small project. Supersedence and remediation scripts in Intune did not change that for us. Someone still had to find the original MSI, if anyone still had it, wrap it into an .intunewin, create the app, set its uninstall command, build a group or filter of the affected machines, assign it, and wait. Only whoever held the original MSI could get the box out.
Two other broken states that used to be that kind of project are already handled in Attestree: per-user apps that landed in SYSTEM’s own profile, and winget failing as SYSTEM with 0xC0000135 on a fresh Windows 11 box. Each page explains the fault and how to check your own machines for it.