Error 0xC0000161 means STATUS_ILLEGAL_CHARACTER. Windows uses this NTSTATUS value when it encounters an invalid character sequence, such as an incomplete multibyte character or Unicode characters 0xFFFF and 0xFFFE. The code is not a complete diagnosis: the correct repair depends on whether it appears during startup, Windows Update, setup, or inside an application. Use the least disruptive recovery step that matches when the failure began.
What error 0xC0000161 means
Microsoft’s MS-ERREF reference defines 0xC0000161 as STATUS_ILLEGAL_CHARACTER: “An illegal character was encountered.” In a multibyte character set, that can mean a lead byte has no succeeding trail byte. In Unicode, the status includes characters 0xFFFF and 0xFFFE.
As an Amazon Associate I earn from qualifying purchases.
This is a status code rather than a component name. The surrounding screen, the application that displayed it, or log files such as CBS.log and Windows Setup logs identify the failing subsystem. A startup failure, an update-installation failure and an application crash can therefore require different fixes.
Choose the repair path before changing anything
| Situation | Best first path | Can Windows still boot? | Data-loss risk | What you need |
|---|---|---|---|---|
| The code appears before Windows reaches the sign-in screen | WinRE Startup Repair | No | Low; it targets startup components | Built-in recovery, or installation media if WinRE does not open |
| The failure started immediately after a quality or feature update | WinRE Uninstall Updates | Usually not reliably | Low; removes the selected update | WinRE and, on encrypted devices, possibly the BitLocker recovery key |
| Windows reaches the desktop or sign-in screen | Safe Mode or a clean-start investigation | Yes, at least partially | Low while diagnosing | Access to Windows or Advanced startup |
| A specific update fails while servicing Windows | Record the KB and inspect servicing logs before repair | Often | Depends on the repair selected | CBS.log or Setup log access |
| Built-in recovery will not load | Boot from Windows installation media and select Repair my PC | No | Low until you choose Reset or reinstall | A bootable USB drive; back up files first |
Do not jump directly to boot-sector commands or a reinstall simply because the hexadecimal code looks serious. Start with recovery tools that preserve personal files, and escalate only when the evidence points to a deeper boot or component-store problem.
#1 Best Overall
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
Before you start: protect access and data
- If the device uses BitLocker, locate its recovery key before entering recovery tools. WinRE may request it before allowing access to the system volume.
- If Windows still opens, copy important documents to another drive or a trusted cloud location. A later Reset this PC or reinstall can remove data.
- Write down the complete message, when it appears, the last update or driver change, and whether the failure is online in Windows or offline in WinRE.
- For an update failure, note the exact KB number and preserve the relevant portion of
CBS.logor the Setup log. That context is more useful than the code alone.
Fix a startup failure with Windows Recovery Environment
Open WinRE automatically
When Windows fails to start repeatedly, Automatic Repair may open the Windows Recovery Environment (WinRE). Choose Advanced options when it appears. If the menu does not show, power the computer on and allow startup to fail several times; do not repeatedly interrupt a normal boot once recovery is available.
Open WinRE from Windows 11
- Open Settings.
- Select System, then Recovery.
- Under Advanced startup, select Restart now.
- After restart, select Troubleshoot to reach the recovery options.
Open WinRE from Windows 10
- Open Settings.
- Go to Update & Security, then Recovery.
- Under Advanced startup, select Restart now.
- Choose Troubleshoot after the restart.
Run Startup Repair first
- In WinRE, select Troubleshoot.
- Choose Advanced options.
- Select Startup Repair.
- Choose your Windows account if prompted and enter its password.
- Select Restart when the tool finishes.
Microsoft describes Startup Repair as a built-in tool that helps fix issues preventing the operating system from starting. It checks common causes including missing or damaged system files, corrupted Boot Configuration Data (BCD), damaged master boot record (MBR) code, incompatible drivers and registry errors. It may report that it could not repair the PC; that result is a reason to continue to the next matching option, not proof that your files are gone.
Undo an update that preceded 0xC0000161
If the first appearance followed Windows Update, remove the most recent applicable update from WinRE rather than deleting files from the component store manually.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- Large Data Storage Capacity: Flash Drive with 128GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer
- Easy to use: The thumb drive is plug and play without any software installation; Supports Windows 7/8/10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also compatible with USB 2.0 and 1.1 ports; Storage is fast, safe and stable
- Wide Compatibility: USB flash drive support TV, desktop, notebook computer, car, audio and other device; It is your great data storage and transfer companion with traveling and working
- Retractable Desgin: The usb drive's retractable design can effectively protect the USB interface; The capless design can avoid losing of cap; Weight: 7g, Size: 2.6 × 0.8 × 0.4 inch. Portable to take your digital world anywhere
- What You Get: 1 x 128GB USB Flash Drive Thumb Drive, All of usb drives have been rigorously tested and formatted before leaving the factory; The default format of the USB stick is exFAT
- Open Troubleshoot > Advanced options.
- Select Uninstall Updates.
- Choose the available option, such as uninstalling the latest quality update or the latest feature update.
- Follow the prompts and restart.
After Windows starts, pause automatic updates temporarily while you identify the failing KB and review the logs. If the error returns only when that package is offered again, record that behavior for the next repair decision.
Try System Restore when a restore point exists
System Restore rolls back system files, drivers, installed programs and settings to an earlier restore point while leaving personal files unchanged. It is useful when the error began after a driver, service or software change and no single update is clearly responsible.
- In WinRE, select Troubleshoot > Advanced options > System Restore.
- Select an administrator account and provide its password.
- Choose a restore point dated before the failure. Use Scan for affected programs if that option is offered.
- Confirm the restore and allow the computer to restart without interrupting it.
System Restore does not replace a file backup and does not roll back personal documents. It may not be available if protection was disabled or no restore point was created.
Rank #3
- What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
- Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
- Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
- Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
- Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
Use Safe Mode or a clean start if Windows reaches logon
When the machine reaches the Windows kernel or sign-in stage, isolate third-party drivers and services before using invasive commands. Microsoft’s startup troubleshooting separates BIOS, boot-loader, OS-loader and kernel phases; Safe Mode loads a limited set of drivers and services so a recent change can be identified.
Recommended Free Tools
Enter Safe Mode from WinRE
- Choose Troubleshoot > Advanced options > Startup Settings.
- Select Restart.
- After restart, press the number for Enable Safe Mode, or Enable Safe Mode with Networking only when network access is necessary.
- In Safe Mode, remove or roll back the driver, service or recently installed program that matches the time of the first failure.
- Restart normally and test before making another change.
Perform a clean-start investigation
A clean start disables non-Microsoft services and startup programs so you can determine whether a background component causes the error. Change only a small group at a time, restart, and restore items after testing. If the error disappears, re-enable items in batches until the responsible service or startup program is identified. Keep a written record so you do not lose the working configuration.
Use Command Prompt only when the symptom indicates boot-code damage
WinRE’s Command Prompt is powerful but easy to misuse. Drive letters can differ from those in normal Windows, and a command intended for one boot phase will not repair an unrelated component-store or XML problem.
Rank #4
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9+; Software download required for Mac, visit the SanDisk SecureAccess support page]
When BOOTREC is appropriate
Microsoft documents BOOTREC /FIXMBR for writing boot code to the system drive’s master boot record and BOOTREC /FIXBOOT for writing a new boot sector. These commands are relevant when the evidence points to damaged boot code or a boot sector, not merely because 0xC0000161 is present.
- In WinRE, select Troubleshoot > Advanced options > Command Prompt.
- Run the specific command that matches the diagnosis:
BOOTREC /FIXMBRorBOOTREC /FIXBOOT. - Close Command Prompt and select Continue to test Windows.
Microsoft warns that fixing the MBR does not repair every partition-table problem. Do not treat these commands as a universal solution, and do not alter partitions unless you have a verified backup and a clear reason.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Understand the Windows Update and component-store variant
A Microsoft Q&A log example shows status=0xc0000161 beside CBS_E_XML_PARSER_FAILURE, “Wrong XML DECL,” “Invalid xml format,” and a package-manifest parsing failure. That demonstrates one servicing/component-store context; it does not establish that every occurrence has the same cause.
Best Value
- COMPATIBILITY: Designed for both Windows 11 Professional and Home editions, this 16GB USB drive provides essential system recovery and repair tools
- FUNCTIONALITY: Helps resolve common issues like slow performance, Windows not loading, black screens, or blue screens through repair and recovery options
- BOOT SUPPORT: UEFI-compliant drive ensures proper system booting across various computer makes and models with 64-bit architecture
- COMPLETE PACKAGE: Includes detailed instructions for system recovery, repair procedures, and proper boot setup for different computer configurations
- RECOVERY FEATURES: Offers multiple recovery options including system repair, fresh installation, system restore, and data recovery tools for Windows 11
When the code appears during an update, capture:
- the exact failing KB or feature-update name;
- the timestamp of the failure;
- the surrounding lines in
CBS.logand, when setup is involved, the Windows Setup log; - whether the failure occurs while Windows is running or inside WinRE;
- any package name, manifest name or XML-parser message.
Use Microsoft’s supported servicing and recovery options first. Do not manually delete files from the component store: doing so can remove packages needed for future repairs and make recovery harder. If uninstalling the update and System Restore do not help, the log context determines whether a supported in-place repair or a reset is the next reasonable step.
Create installation media when WinRE cannot start
A bootable Windows USB drive provides another route into WinRE. You need access to another working computer, a USB flash drive suitable for Windows installation media, and the correct Windows edition or architecture for the affected PC.
- Create Windows installation media on the USB drive using Microsoft’s official media-creation process.
- Insert the USB drive into the affected computer and boot from it using the device’s boot-menu key or firmware settings.
- At Windows Setup, choose the language and keyboard options, then select Repair my PC instead of installing.
- Use Troubleshoot and the same Startup Repair, Uninstall Updates, System Restore or Command Prompt paths described above.
Microsoft notes that OEM recovery media may be preferable when hardware-specific drivers are needed. Generic installation media can still reach recovery tools, but a full reinstall can remove data, applications and settings. Back up files whenever possible and confirm the BitLocker recovery key before proceeding.
Escalate to Reset or reinstall only after recovery attempts
WinRE also offers Reset this PC and, depending on the device, UEFI firmware settings. Reset is more disruptive than Startup Repair, update removal or System Restore. Review the available keep-files option carefully, understand which applications will be removed, and make an external backup first. A clean reinstall is the last resort when supported recovery cannot restore a bootable system or a known-good servicing state.
Common mistakes to avoid
- Assuming the code identifies one cause: it only reports an illegal-character status; the screen and logs supply the missing context.
- Running boot commands first: MBR or boot-sector repair cannot correct every partition problem and is irrelevant to many update or application failures.
- Deleting component-store files: unsupported cleanup can make later servicing impossible.
- Skipping backups: Reset and reinstall operations can remove data, while a BitLocker prompt can block access without the recovery key.
- Repeating the same failed update: record the KB and log details before allowing it to install again.
- Changing many things at once: Safe Mode and clean-start diagnosis work only when changes are controlled and reversible.
Optional shortcut after the manual fixes
After you have tried the Windows recovery steps, Outbyte PC Repair is an optional shortcut for Windows 11, 10, 8 and 7. It can address more than 100 common Windows issues where possible, including broken system elements, invalid redirects and shared DLL files; adjust settings that affect CPU, RAM and disk load; clean temporary and cache files; check Windows settings, missing updates and potentially unwanted applications; and provide tools such as a real-time boost, file shredder and app-crash log. It complements antivirus software rather than replacing it, results vary, and no utility repairs every crash. A category-based free trial lasts at least two days before a paid subscription.
Bottom line
Start with WinRE Startup Repair for a non-booting PC. If an update preceded the error, uninstall that update and preserve the KB and servicing-log evidence. Use System Restore, Safe Mode or a clean start when Windows can still reach the kernel or sign-in stage. Reserve BOOTREC, installation media, Reset and reinstall for cases where the observed symptoms justify them, and protect files and BitLocker access before escalating.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.

