Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Windows Server update fails with 0x800F0922 (CBS_E_INSTALLERS_FAILED): the corrupted SecureBootEncodeUEFI task

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A Windows update that fails on Windows Server with 0x800F0922 (CBS_E_INSTALLERS_FAILED) and then rolls back has one documented cause on Microsoft's page: the scheduled task SecureBootEncodeUEFI is corrupted. The log signs are a RegisterTask failed 0x80070002 entry in CBS.log and Task Scheduler event 146 for the task \Microsoft\Windows\PI\SecureBootEncodeUEFI.

The fix removes the staged update packages and then deletes four registry entries that hold the task. Take a backup or snapshot of the server first, export the registry entries, and confirm the two log signatures before you delete anything. Microsoft's page shows both signatures; if you see neither, treat the cause as unconfirmed. A missing Task Scheduler event is not by itself proof of another cause, because the Operational log may be disabled on your server.

What the error means

Microsoft's page says: "This article helps resolve the 0x800F0922 (CBS_E_INSTALLERS_FAILED) error that occurs when installing Windows updates." It applies to "Supported versions of Windows Server".

Windows installs updates through component-based servicing (CBS), which keeps its log in CBS.log. In Microsoft's example, the update runs an "advanced installer" for the Task Scheduler component. That installer tries to register the task and fails. The log shows InstallTaskOnline: RegisterTask failed 0x80070002, followed by HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) and "The system cannot find the file specified." CBS then reports: "Failed to process advanced operation queue, startupPhase: 0. A rollback transaction will be created. [HRESULT = 0x800f0922 - CBS_E_INSTALLERS_FAILED]".

The code behind the failure, 0x80070002, is on the DISM page's list of corruption error codes as ERROR_FILE_NOT_FOUND, "The system cannot find the file specified." That list covers many unrelated faults, so the code alone does not identify the task as the cause. The log goes on to show the rollback: "Progress: UI message updated. Operation type: Update. Stage: 1 out of 1. Rollback." and "Setting original failure status: 0x800f0922".

The second signature is in the Task Scheduler log. Microsoft's page shows this event in Microsoft-Windows-TaskScheduler/Operational: event ID 146, task category "Task loading at service startup failed", with the description "Task Scheduler failed to load task "\Microsoft\Windows\PI\SecureBootEncodeUEFI" at service startup. Additional Data: Error Value: 2147942402." Microsoft's statement of cause is: "This issue occurs because the scheduled SecureBootEncodeUEFI task is corrupted."

Microsoft's example log shows version 10.0.14393.6078 for the component. It does not say that the problem is limited to that build, and it does not list the Windows Server versions. Treat the build number as the page's example and not as a limit.

Likely causes

Cause What you see How to confirm
Corrupted SecureBootEncodeUEFI scheduled task (the cause Microsoft's page documents) Update fails with 0x800F0922 and rolls back CBS.log has RegisterTask failed 0x80070002 for this task; Task Scheduler event 146 names \Microsoft\Windows\PI\SecureBootEncodeUEFI
Other component-store corruption Different CBS.log entries; codes such as 0x80070002 or 0x800f081f in the Setup log The DISM page's table of corruption error codes; no SecureBootEncodeUEFI entries

Prove the cause before changing anything

These steps only read. On the server, search CBS.log for the task:

findstr /i "SecureBootEncodeUEFI" %windir%\Logs\CBS\CBS.log
findstr /i /c:"RegisterTask failed" /c:"0x800f0922" %windir%\Logs\CBS\CBS.log

Microsoft's page shows findstr /i used on command output, and the DISM page names %windir%\Logs\CBS\CBS.log as the log location. The first command finds the component line that names the task. In the page's log, the RegisterTask failed and 0x800f0922 lines do not contain the task name, so the second command lists them.

Do not stop at one line. The error code 0x800f0922 appears for a failed installer, and Microsoft's cause is specific to this task, so look for the task name in the CBS.log entries and in the event log before the fix is applied. Microsoft's page does not say both are required; if the Operational log is disabled, event 146 cannot appear, and that alone does not rule the task out.

Then read the Task Scheduler event:

Get-WinEvent -FilterHashtable @{ LogName='Microsoft-Windows-TaskScheduler/Operational'; Id=146 }

The Get-WinEvent page shows the -FilterHashtable form with LogName and Id. Event 146 for the SecureBootEncodeUEFI task confirms the second signature.

Next, list the staged update packages, which the fix removes:

Dism /english /online /get-packages /format:table | findstr /i "Staged"

Save the output. Also read the task's identifier, which you need later:

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PI\SecureBootEncodeUEFI" /v ID

The output ends with ID REG_SZ {GUID}, where the braces enclose a long identifier. Keep it. If this command returns nothing, stop: there is no identifier to use, and none of the commands below may be run.

Example (illustrative): the file server fs01 at contoso.com.au fails its monthly update with 0x800F0922 twice in a row. CBS.log on fs01 has RegisterTask failed 0x80070002 for the Task Scheduler installer, and Task Scheduler event 146 appears at each service start. reg query returns an ID for the task, and get-packages lists one staged package. Both signatures match, so Microsoft's fix applies.

Fix

Step 1: make a restore point you can use. Take a backup, or snapshot the server if it is a virtual machine, and confirm it is usable. The steps that follow change the registry and the servicing store.

Step 2: export the registry entries. Replace GUID-VALUE with the identifier you read, including braces, in each command. Create C:\Temp first if it does not exist.

reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Maintenance\GUID-VALUE" C:\Temp\task-maintenance.reg
reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Plain\GUID-VALUE" C:\Temp\task-plain.reg
reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\GUID-VALUE" C:\Temp\task-tasks.reg
reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PI\SecureBootEncodeUEFI" C:\Temp\task-tree.reg

The reg export page gives the form reg export keyname filename, with a .reg file name. The same page lists return values for reg export: 0 is success and 1 is failure. Check each result and note which of the four files were created before you go on. A key whose export failed (for example because it does not exist) has nothing to import later.

Step 3: remove the staged update packages. Microsoft's page says only "Delete the staged update packages" and does not say whether that means all staged packages or only the one tied to the failing update, so keep the get-packages output you saved and write down which package you chose and why. Use a package name from that output. Microsoft's example is Dism /online /remove-package /PackageName:Package_for_RollupFix~31bf3856ad364e35~amd64~~14393XXXX.

Disruptive step: this removes staged update packages from the servicing store. Microsoft's page gives no way to put a removed package back by hand and does not say whether Windows Update stages it again. Back-out: only the backup or snapshot from Step 1. Remove only packages listed as Staged, and one at a time.

Step 4: delete the task entries. Microsoft's page lists four reg delete commands with /f, which deletes without asking. Before you run any of them, check that each of the first three ends in the braces identifier from reg query, and never run one whose last path element is a parent folder such as Tasks: that would remove every task under it, and the exports above would not cover it.

Disruptive step: these commands delete the registry entries for the scheduled task SecureBootEncodeUEFI. Microsoft's page does not say whether Task Scheduler gets the task back. Back-out: run reg import on each .reg file you exported, for example reg import C:\Temp\task-tree.reg; a key whose export failed has no file to import.

reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Maintenance\GUID-VALUE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Plain\GUID-VALUE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\GUID-VALUE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PI\SecureBootEncodeUEFI" /f

Microsoft's page also links to MS10-092 for more on cleaning up corrupted tasks. No step from that link is included here.

If the signatures do not match.

Save first: have the Step 1 backup in place.

Risk: the DISM repair below replaces damaged component files and changes the servicing store.

The DISM page's general repair is DISM.exe /Online /Cleanup-image /Restorehealth, followed by sfc /scannow, then running Windows Update again. That page says DISM "may take several minutes" and fetches files from Windows Update unless you give a source. There is no command-line undo; recovery is from the backup.

Confirm the fix

  1. Run Windows Update again and confirm the update installs without 0x800F0922 and without a rollback.
  2. Search CBS.log again for RegisterTask failed and confirm there is no new entry with the time of the retry.
  3. Check Task Scheduler event 146 for SecureBootEncodeUEFI at the next service start; there should be no new one.

What to watch afterwards

  • The next monthly update cycle on this server and its siblings. Check for the same two signatures on any server that fails.
  • Whether the task returns. Microsoft's page does not say; if it does, reg query on the Tree key returns an ID again.
  • Event 146 for other task names, which would be a different corruption that Microsoft's page does not cover.
  • The exported .reg files in C:\Temp; keep them until a full update cycle has completed.

Risks and limits

These commands have not been run or lab-tested.

Microsoft's page documents one cause and one fix. It does not say how many servers share the problem, which Windows Server versions are affected, or why the task becomes corrupted. The back-out for the registry steps relies on the exports you made. If an export failed, you do not have one.

Sources