[Fix] DISM Error 1: Incorrect Function

When you run the component store cleanup or install a Feature-On-Demand package using DISM, the error code 1 may appear.

C:\Windows\System32>DISM /Online /Cleanup-Image /StartComponentCleanup

Deployment Image Servicing and Management tool
Version: 10.0.26100.5074

Image Version: 10.0.26100.7171

[===========================70.0%========                  ]

Error: 1

Incorrect function.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

Cause

This happens if makecab.exe is unable to archive the CBS logs. When the error occurs, the CBS.log file may contain the following lines:

Info                  CBS    Maint: launch type: StartComponentCleanup
Info                  CBS    Reboot mark set
Info                  CBS    Winlogon: Registering for CreateSession notifications
Info                  CBS    Winlogon: Loading SysNotify DLL
Info                  CBS    Winlogon: Starting notify server 
Info                  CBS    Maint: available free space >16GiB; disabling compression
Info                  CBS    Maint: begin archive logs
Info                  SXS    Baseline components preload finished
Warning               CBS    Unable to create cab 'C:\WINDOWS\Logs\CBS\CbsPersist_20251116132807.cab' using cabapi; falling back to makecab: 801882d9 [Error,Facility=(0018),Code=33497 (0x82d9)]
Info                  CBS    Failed to create backup log cab. [HRESULT = 0x80070001 - ERROR_INVALID_FUNCTION]
Info                  CBS    Failed cab compressing log file C:\WINDOWS\Logs\CBS\CbsPersist_20251116132807.log [HRESULT = 0x80070001 - ERROR_INVALID_FUNCTION]
Info                  CBS    Failed archiving backup logs [HRESULT = 0x80070001 - ERROR_INVALID_FUNCTION]
Info                  CBS    Failed archiving backup logs [HRESULT = 0x80070001 - ERROR_INVALID_FUNCTION]
Info                  CBS    Maint: end archive logs, archive time so far: 865 seconds

Resolution

To resolve the issue, clear the CBS logs.

Open Command Prompt (admin) and run the following commands:



net stop trustedinstaller

cd /d C:\WINDOWS\Logs\CBS

del cbs*.*

Then, rerun the component store cleanup:

DISM /Online /Cleanup-Image /StartComponentCleanup

That should resolve the issue.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time.

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a ten-time recipient of the Microsoft MVP award in Windows Desktop Experience (Windows Shell), from 2003 to 2012. Ramesh founded Winhelponline.com in 2005.

Leave a Comment