Error Invalid Flag Number 186 (0xBA): How to Fix it

This error can occur when upgrading Windows

Reading time icon 2 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

ERROR_INVALID_FLAG_NUMBER
XINSTALL BY CLICKING THE DOWNLOAD FILE
A message from our partner

For fixing Windows errors, we recommend Fortect:

Fortect will identify and deploy the correct fix for your Windows errors. Follow the 3 easy steps to get rid of Windows errors:

  • Download Fortect and install it on your PC
  • Launch the tool and Start scanning your PC for Windows errors
  • Right-click on Start Repair to deploy the right fix for each error encountered during the scan
Download Now Fortect has been downloaded by 0 readers this month, rated 4.6 on TrustPilot

Error_Invalid_Flag_Number usually comes with the following code 186 (0xBA) and The flag passed is not correct message.

This is a developer error, but sometimes regular users can encounter it when updating Windows, and if this happens, this guide will show you a couple of solutions that you can use.

How can I fix Error_Invalid_Flag_Number?

1. Reset Windows Update Components

  1. Press the Windows key + S and type cmd. Choose Run as administrator.
    CMD elevated
  2. Next, run the following commands:
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
    Ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    Ren C:\Windows\System32\catroot2 Catroot2.old
    net start wuauserv
    net start cryptSvc
    net start bits
    net start msiserver
  3. Check if the issue is gone.

To make this process faster, you can always use the Windows Update Components reset script.

2. Perform an in-place upgrade

  1. Visit the Windows 11 download page.
  2. Select the edition you want to download.
    download ISO
  3. Next, choose the language.
  4. Lastly, click on 64-bit Download.
  5. Once the ISO file is downloaded, double-click it to mount it.
  6. Select the setup.exe file.
    Run Setup to fix 0x80071AB1
  7. Follow the instructions on the screen.
  8. Be sure to select the Keep personal files and apps option to preserve all your files.
    keep personal files and apps w11
  9. Follow the instructions on the screen to complete the process.

3. Other tips to try

  1. If you’re upgrading Windows remove third-party antivirus software and disconnect all peripherals.
  2. If a specific application is giving you this error, try reinstalling it.
  3. Adjust the flags. For this, it might be necessary to contact the application developer.

The Error_Invalid_Flag_Number is an obscure error, but if you ever encounter it, try our solutions. If you have found a different solution that worked for you, don’t hesitate to share it with us in the comments section.

Before you leave, don’t miss our guides on ERROR_INVALID_SEGMENT_NUMBER and ERROR_INVALID_EVENT_COUNT for more information.

Our latest guide covers Error_No_Signal_Sent, so don’t miss it for more useful tips. We also have an article dedicated to the Invalid_Slot_Allocator_Flags error that might interest you.

More about the topics: error

User forum

0 messages