Windows does not boot after deleting some files inside system32\code integrity folder

Mustafa BEDIR 0 Reputation points
2025-12-09T18:20:42.4+00:00

I was trying to open an exe file that installs a program i used to have and use without problems. However windows did not let me run it saying that it contained virus. After some back and forth conversations with chatgpt it said that the code integrity policy enforcement status was = 2 and it was preventing me to run the executable file. It then told me to remove the following files from the code integrity folder inside system32: driversipolicy.p7b, vbsipolicy.p7b, and all of the contents inside the cipolicies folder. At first i couldn't delete because i needed permission from trustedinstaller even though im the admin. Then gpt made it so that my user is the owner of those files. With that unfortunately i was able to delete it and i restarted my pc. While booting, the bitlocker recovery screen opened. I tried to enter my recovery key and boot however another screen came saying automatic repair couldnt start my pc. Then in startup repair i tried to start it in safe mode but it also didn't work. Then chatgpt told me to open the command prompt, i did and it asked me my microsoft password however my password didn't work for some reason so i clicked on the forgot password or cant see your username option. The pc restarted after i clicked on that option and i was able to open command prompt where i entered the codes that chat gpt provided to me: manage-bde -unlock C: RecoveryPassword xxxxx-xxxxx-...

manage-bde -protectors -disable C: after exiting chat gpt gave me some more codes for me to run on command prompt but i couldn't acces command prompt the same way anymore and it still did not accept my password. So right now i'm in a boot loop. Can i somehow get out of that loop? Also i cannot use system restore since it also asks for my microsoft password and it does not accept my password even if it did i wouldn't want to do that if i have another option to save my pc since there is a lots of stuff backed up on my pc and unfortunately i only have 1 driver so i dont want to lose my data.

Windows for home | Windows 10 | Recovery and backup
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. David Sanchez 17,370 Reputation points Independent Advisor
    2025-12-09T20:55:27.9066667+00:00

    Hi there! My name is David. It’s a pleasure to help you today.

    Thank you for posting your issue. I understand your situation and know it can be frustrating if your PC does not boot correctly. However it is not recommended to delete system files if you do not know their function. That is why these files are protected so that the user cannot modify or delete them.

    Try to enter the recovery environment (WinRE) Turn on your PC and when you see the Windows logo, shut it down using the power button. Do this several times until WinRE loads.

    In WInRE go to > Troubleshoot > Advanced options > Command Promp

    When it asks for the password, try using the local account password, or attempt to proceed without a password.

    In Command Prompt, use the following commands followed by the Enter key:

    sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
    
    DISM /Image:C:\ /Cleanup-Image /RestoreHealth
    

    As a last option, I would suggest trying a new installation of Windows.

    To avoid losing access to your files, you can make a backup by connecting your drive to another PC. With the BitLocker key for your drive, you will be able to access the folders and files so you can back them up before deciding to perform a new installation of Windows.

    Let me know if the shared information has been helpful. Regards.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.