The advapi32.dll library is part of the WinAPI, a collection of elements required for the Windows APIs to function. All components of the Windows operating system – programs, services or utilities, down to the usual menu buttons of any window – refer to similar libraries for correct operation. Specifically, this library is responsible for organizing the work of the system registry and user accounts.
Contents
Causes and meaning of DLL error
Errors with advapi32.dll often occur when working with Microsoft applications – especially games from the Microsoft Store (Age of Empires series, Halo, etc.) and Microsoft Office components. It is also possible that a library error appears when developing your own applications in Visual Studio.
The error message might look like this: “The entry point to the ‘EventActivityIdControl’ procedure was not found in the ADVAPI32.dll DLL.” Or: “Application failed to start because DLL advapi32.dll was not found.” The name of the procedure may differ depending on the source of the error.
The error usually manifests itself in the following cases:
- a virus was registered in the Windows System32 system folder, intercepting the work of this library or replacing it, or the library was deleted by the computer user;
- you are using an old version of Windows (maybe Windows XP, or not updated Windows 7), and the application is designed for newer OS versions;
- if the problem manifests itself during programming, then it is possible that a “custom” class that refers to this library is incorrectly declared in the program you are developing.
How to fix advapi32.dll error in Windows
Let’s consider the most common ways to fix the dll error occurring with advapi32.dll. It is better to apply them in order of urgency: antivirus → system update → system restore. It almost never makes sense to install updates or rollback to an infected system – occasionally a rollback on an infected system is performed to catch and remove a dormant virus.
If you are confident that the system is absolutely “clean”, the best result in practice is from system updates.
Advapi32.dll error when turning on the computer
If the error appears at system startup (for example, even before the Desktop is visible), you will need a bootable disk or USB flash drive with Windows. Boot from the disk and launch the “Recovery Console” (by default, the R key or an option that says something like “Repair your computer”). Then, in the console window, type the following text:
expand D: i386 advapi32.dl_ C: Windows system32
Instead of D: write the letter of the drive from which the system file is copied (that is, the letter of the drive or flash drive), instead of C: – the letter of the system drive (where we copy the required DLL), if for some reason you have it somewhere else … Hit Enter. If everything is ok, the console will write something like:
advapi32.dll
1 file <s> expanded.
Reboot, try to start the system without a boot disk.
If this method does not work either, you can try to manually upload the advapi32.dll file from a healthy system. The file is located on the system drive in the Windows System32 folder. We connect the hard disk with the faulty OS as an additional one to the system in which everything is fine, then copy the healthy file to the System32 folder on the disk with the non-working OS. If the problem was in this file, it will be solved – and you can start the system again.
Checking for viruses
The most effective way to scan for viruses and cure the infected system is Dr.Web CureIt! (just like that, with an exclamation mark). It is free for non-commercial use and does not require installation.
It is better to run the program twice: once on a running system, and once more, booting in “Safe Mode” – without additional programs (which are often masked by viruses) and with only a minimal set of working libraries.
To boot Windows 7 in Safe Mode, click Start → Run, type msconfig in the line that appears and press Enter. The “System Configuration” service will open, where you can go to the “Boot” tab and put a tick in the “Safe Boot” line, after which the next time you reboot the computer will start in “safe” mode.
Updating the system
We made sure that there are no viruses in the system (or that they were, but we removed them). Let’s start updating the system.
For Windows XP systems, unfortunately, the best advice is to upgrade to newer versions of Windows. The computer on which XP is running can cope with the minimum version of the “seven”.
For Windows 7, where this error occurs most often, it is recommended to install the KB3080149 update from the Microsoft website – it solves the compatibility issues of this DLL with new applications. If you have a 32-bit version of the OS, you will need to install the update KB3080149-x86, if it is 64-bit, then KB3080149-64. At the time of this writing, these updates are located at https://www.microsoft.com/en-us/download/details.aspx?id=48638 and https://www.microsoft.com/en-us/download/details .aspx? id = 48636, respectively.
Installing KB for Windows 7 is done by double-clicking. The abbreviation KB in the name of the update stands for “Knowledge Base” – “knowledge base” of Microsoft. Once installed, the update will ask you to restart your computer. We reboot, check for an error – most likely, it will disappear.
System rollback and disk check
In rare cases, especially if you notice that an error occurred after installing a program or update, the Windows System Restore utility can help. Click Start → Run → rstrui.exe. Select a recovery date – if possible, before the error occurred. Restoring the system files to the selected checkpoint is a lengthy process, but upon completion it may also roll back unwanted changes that have corrupted the system library.
Also on Windows 7 and Vista systems, it is possible to use the SFC (System File Checker) utility. The utility successfully detects faulty system libraries and can try to restore their working state. To run the utility, you need a Windows system disk or flash drive. Start the “Recovery Console” from it.
In the console, enter this:
sfc / scannow / offbootdir = C: / offwindir = C: Windows
C: – the letter of your system drive, C: Windows – by default, the folder with the OS. If things are different on your computer, correct the letters and address accordingly. Also, pay attention to spaces: they appear after the sfc command, after the / scannow command, and after / offbootdir = C: .
If the utility finds something and fixes it, it will happily report it: “found corrupt files and successfully repaired them”. Reboot, see if the problem has disappeared.
We hope this article has given you a hint on how to fix the problem with advapi32.dll. Leave your comments if you have any questions – we will definitely answer you!