This code is Windows saying a program asked for access to a file, a folder, or another object and was refused because it does not have the rights it needs. Microsoft's name for it is STATUS_ACCESS_DENIED. It is a permissions problem, not a broken program, so the fix is about who is allowed to touch what, not about reinstalling Windows.
The fix, in order
Run the program as administrator. Right-click its shortcut and choose Run as administrator. If it works, the cause is permissions, and you can set it permanently under Properties, Compatibility, Run this program as an administrator.
Unblock a downloaded file. Right-click the file, choose Properties, and if there is an Unblock checkbox at the bottom, tick it and click Apply. Files downloaded from the internet carry a mark that can block them from running.
Check the file or folder permissions. Right-click it, choose Properties, Security, and confirm your account has Read and, where needed, Write access. If it does not, click Edit and add your account with the needed permissions.
Move the program out of a protected folder. Programs installed under C:\Program Files or the Windows folder need admin rights to write there. Installing to a normal folder under your user profile avoids the problem for programs that save settings next to their own files.
Check whether antivirus quarantined a file. Open your security software, look at its quarantine and protection history, and if it blocked a file the program needs, restore it only if you trust the program and its source.
Close anything that has the file open. Another program holding the file, a stuck process in Task Manager, or a file sync tool can lock it and produce the same refusal. Close the other program and try again.
Repair Windows files if it is widespread. In an admin Command Prompt run sfc /scannow, then DISM /Online /Cleanup-Image /RestoreHealth.
Do not take ownership of the whole Windows folder or the whole drive. Changing permissions across system folders breaks Windows updates and can leave the PC unbootable. Change permissions only on the specific file or folder the program needs.
If it still happens
If the error appears for one account but not another, the problem is in that account's permissions or profile, so test with a fresh local administrator account to confirm. If it appears for every program that touches a particular drive or folder, check whether the folder is encrypted, compressed, or on a network share that dropped its connection, and reconnect or decrypt it before changing permissions.
Common questions
Does running as administrator fix 0xc0000022? Often, yes, when the program needs to write to a protected folder or read a protected file. If it works as administrator, the cause is permissions, not a broken program. Set it to always run as administrator only if you trust the program and its source.
Is 0xc0000022 a virus? No. It is a permissions refusal, and it happens with ordinary files and programs. Antivirus software can cause it by blocking a file, and malware can cause it by locking files, but the code itself only means access was denied.
Why does a file I own say access is denied? Ownership and permission are separate things in Windows. A file can belong to your account yet still deny access if its permission list does not include you, if another program has it open, or if it came from another PC and carries that PC's permissions.