How to Repair Potentially Corrupted Windows 11 System, Ideally WITHOUT a PC Reset?

Robert Grady 0 Reputation points
2024-03-18T17:37:40.48+00:00

Reposting since I didn't realize that I couldn't add an event log dump, so I've removed the offending bit (that was my bad).

I'm having some really weird issues with my Windows 11 laptop. The short version is this: I'd been having some issues with performance and, since I was getting Code Integrity warnings about keyman.dll being blocked (for those who are unfamiliar, Keyman is a keyboard layout switcher that I use for writing in either EuroLatin—ä, ɵ, ò, û, ñ, etc.—or IPA), so I assumed that Code Integrity and memory scanning might be the issue. Disabling it in the Settings didn't have any effect—it still displayed as enabled when I opened the System Information dialog—so I tried uninstalling the Virtual Machine Platform feature from the Windows Features dialog.

This apparently royally broke my Windows system, though it didn't seem obvious at first. The next time I opened File Explorer, it froze and had to be force-closed. This behaviour persisted, along with several errors in Event Viewer about Windows Search Service crashing because "The file exists". After some digging with the assistance of Hussen from live support and Derrick on the Microsoft Answers forum (link here), it seems like the issue was the ACLs of the C:\Program Files\WindowsApps directory getting corrupted.

After File Explorer was fixed, things seemed fine for a bit until the Start Menu stopped working. I dug into that, and it seems like rebooting into Active Directory Repair mode with msconfig fixed it, but I don't want to assume that that fixed everything, especially since I'm still getting a lot of RPC and other errors in the Event Viewer, including:

  • RPC call to function WLIDCreateContext returned the following error code: 0x8004800C.
  • The miniport logged an event.
  • Error 0x80070002 occurred while verifying known folder {c4900540-2379-4c75-844b-64e6faf8716b} with path ...

I also had to run the Repair feature from the Apps settings for the Microsoft Store, Calculator, and Notepad apps, because they couldn't start and were raising Deployment Register issues in the Event logs.

So, my question is this: what steps should I take to finish repairing my installation? Ideally, I'd like to do so without having to re-install the ~380 GB of applications that are already installed on my computer, so unless we've exhausted literally all of our options, I don't want to do anything like a PC reset.

Steps I've already taken/tried include:

  • DISM
  • SFC
  • Reinstalling the Virtual Machine Platform.
  • Performing an in-place upgrade (several times).
  • Taking ownership of the C:\Program Files\WindowsApps directory with takeown and resetting the ACLs with iacls.
  • Taking ownership of the C:\Program Files directory with takeown and resetting the ACLs with iacls.
  • Restoring ownership of C:\Program Files directory to the Administrators group with takeown and using iacls to reset their permissions.
  • Rebooting into Safe Mode with Active Directory Repair enabled.
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,198 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Wesley Li 4,965 Reputation points
    2024-03-21T02:32:07.2733333+00:00

    Hello

    If an in-place upgrade reapir won't fix the corrupted system files, I am afraid perform a clean installation is the only option.


  2. MotoX80 31,581 Reputation points
    2024-04-15T15:34:36.36+00:00

    It says I'm up-to-date.

    For your reference, I am running Win11 22H2, version 10.0.22621.3447 and I see these updates. I've highlighted the cumulative ones. If you have these installed, then great. Otherwise you might want to run the Windows Update troubleshooter and see if that fixes WU.

    User's image

    Are the Defender updates getting installed?

    User's image

    If you've reset the permissions/ownership on C:\Program Files\WindowsApps, then I would think that all bets are off as to what's going to work or fail in the future. In my bag of tricks, I have a Powershell script that analyzes the permissions on a folder structure and generates the icacls commands that would allow me to restore them. (To save me from co-workers who do dumb things, mainly on data folders.)

    I see a number of security principles being referenced and if you've removed them, then I have no way to know the impact of that.

    User's image

    I would think that an upgrade repair is your best bet to recover your current OS. Looking over the other post that you referenced, you've already tried that. That indicates to me that something that you have installed, like this keyman.dll, is interfering with the OS. That fits with your comment of "explorer works if I boot into safe mode". I'd suggest uninstalling that software and any other 3rd party software that might hook into the OS at a low level. Then try the upgrade/repair again with the latest ISO download.

    https://answers.microsoft.com/en-us/windows/forum/all/how-to-perform-repair-upgrade-in-windows-11/8099a5ae-8afc-406f-864d-8d13c3742d8d

    If that doesn't fix it, then back up your data files to an external drive and install a fresh copy of Windows. There is no way that we forum users can know what your PC is doing.