Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

This article is dedicated to helping users remove Trojan Patched.AO and fix the DNSAPI.dll missing  error, which may be connected to the trojan virus family, as users commonly refer to them. The DNSAPI.dll Missing Error can also be displayed on its own, but much of the time it is “broken” by the trojan in question.


Again, if you are here for the dnsapi.dll missing error, this may be related to a trojan virus called Win32/Patched.AO. The removal guide will provide solutions for both the error and the virus, if there is one.

Despite being predominantly called Viruses by most users, in reality Trojans are not, as surprising as this sounds. They are still very much malicious and dangerous, but the fine distinction between viruses and malware is that viruses can replicate and regenerate themselves even if you delete them. They have in-built capabilities to do so. Trojan Win32/Patched.AO and DNSAPI.dll Missing Error can not. Facts point that if you manage to remove them once, they will not come back to bother you again. That is why there is an entirely different classification called “malware” and this is the one the trojan belongs to.

Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

What is a Trojan?

The simplest explanation is the classical one. Just as the famous trojan horse it was named after, this type of malware serves as a front or back door, depending how you look at it. They basically get in and leak information to whoever created them, as well as serve as a weak point in the security system of your computer. If a Trojan is associated with another virus it can help that virus install itself on your machine without your authorization or knowledge. Hackers who create Trojans are often paid by hackers who make other viruses in order to use the network of infected computers to distribute their malicious work.

How does DNSAPI.dll Missing Error factor in the work of the Trojan?

The DNSAPI.dll file is a library file used by Windows in task related to internet access and for this reason it is often targeted by threats like Trojan Win32/Patched.AO. It is used by Window’s DNS Client API and if it has been tampered with or corrupted Windows cannot process the settings inside, thus causing a variety of DNS Client error files to pop up. A list of these errors include:

  • This application failed to start because DNSAPI.DLL was not found. Re-installing the application may fix this problem.
  • Dnsapi.dll not found.
  • The file Dnsapi.dll is missing.
  • Dnsapi.dll Access Violation.
  • Cannot register dnsapi.dll.
  • Cannot find C:WindowsSystem32\dnsapi.dll.

These errors will most often pop during start-up after a system power-on/reboot, but they can also appear when another program on your computer tries to access Dnsapi.dll. These errors are a sure sign you have a serious Trojan-related problem.

DO NOT try to simply replace Dnsapi.dll on your computer without dealing with the Trojan! It will remain installed on your compter and also there are many fake sites that offer manipulated .dll files. Even if the error disappears it could be because the .dll file is written more cleverly and Windows cannot recognize that the file is not the original one.

If you are seeing any of these errors on your computer then you must take adequate action against Trojan Win32/Patched.AO. The fact that Dnsapi.dll has been changed renders your computer vulnerable and also makes any firewall you have impotent in adequately dealing with attempts to install viruses on your computer. The more you wait the greater the chances you will have a bigger collection of other threats to deal with.


Name Patched.AO and DNSAPI.dll
Type Potentially Unwanted Programs and Files
Danger Level Medium.
Symptoms Unwanted Ads and Toolbars, search engine redirects.
Distribution Method Software bundles, Email attachments, online Ads, infected torrent files.
Detection Tool

Remove Patched.AO and DNSAPI.dll

If you are looking for a way to remove Patched.AO and DNSAPI.dll you can try this:

  1. Click on the Start button in the bottom left corner of your Windows OS.
  2. Go to Control Panel -> Programs and Features -> Uninstall a Program.
  3. Search for Patched.AO and DNSAPI.dll and any other unfamiliar programs.
  4. Uninstall Patched.AO and DNSAPI.dll as well as other suspicious programs.

Note that this might not get rid of Patched.AO and DNSAPI.dll completely. For more detailed removal instructions follow the guide below.

If you have a Windows virus, continue with the guide below.

If you have a Mac virus, please use our How to remove Ads on Mac guide.

If you have an Android virus, please use our Android Malware Removal guide.

If you have an iPhone virus, please use our iPhone Virus Removal guide

Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

Some of the steps will likely require you to exit the page. Bookmark it for later reference.

Reboot in Safe Mode (use this guide if you don’t know how to do it).

Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error


Press CTRL + SHIFT + ESC at the same time and go to the Processes Tab. Try to determine which processes are dangerous. 

Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

Right click on each of them and select Open File Location. Then scan the files with our free online virus scanner:

Each file will be scanned with up to 64 antivirus programs to ensure maximum accuracy
This scanner is free and will always remain free for our website's users.
This file is not matched with any known malware in the database. You can either do a full real-time scan of the file or skip it to upload a new file. Doing a full scan with 64 antivirus programs can take up to 3-4 minutes per file.
Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error
Drag and Drop File Here To Scan
Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error
Analyzing 0 s
Each file will be scanned with up to 64 antivirus programs to ensure maximum accuracy
    This scanner is based on VirusTotal's API. By submitting data to it, you agree to their Terms of Service and Privacy Policy, and to the sharing of your sample submission with the security community. Please do not submit files with personal information if you do not want them to be shared.

    After you open their folder, end the processes that are infected, then delete their folders. 

    Note: If you are sure something is part of the infection – delete it, even if the scanner doesn’t flag it. No anti-virus program can detect all infections. 

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    Hold together the Start Key and R. Type appwiz.cpl –> OK.

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    You are now in the Control Panel. Look for suspicious entries. Uninstall it/them. If you see a screen like this when you click Uninstall, choose NO:

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    Type msconfig in the search field and hit enter. A window will pop-up:

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    Startup —> Uncheck entries that have “Unknown” as Manufacturer or otherwise look suspicious.

    • Remember this step – if you have reason to believe a bigger threat (like ransomware) is on your PC, check everything here.

    Hold the Start Key and R –  copy + paste the following and click OK:

    notepad %windir%/system32/Drivers/etc/hosts

    A new file will open. If you are hacked, there will be a bunch of other IPs connected to you at the bottom. Look at the image below:

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    If there are suspicious IPs below “Localhost” – write to us in the comments.

    Remove Trojan Patched.AO and Fix DNSAPI.dll Missing Error

    Type Regedit in the windows search field and press Enter.

    Once inside, press CTRL and F together and type the virus’s Name. Right click and delete any entries you find with a similar name. If they don’t show up this way, go manually to these directories and delete/uninstall them:

    • HKEY_CURRENT_USER—-Software—–Random Directory. It could be any one of them – ask us if you can’t discern which ones are malicious.
      HKEY_CURRENT_USER—-Software—Microsoft—-Windows—CurrentVersion—Run– Random
      HKEY_CURRENT_USER—-Software—Microsoft—Internet Explorer—-Main—- Random

    If the guide doesn’t help, download the anti-virus program we recommended or try our free online virus scanner. Also, you can always ask us in the comments for help!


    About the author


    Violet George

    Violet is an active writer with a passion for all things cyber security. She enjoys helping victims of computer virus infections remove them and successfully deal with the aftermath of the attacks. But most importantly, Violet makes it her priority to spend time educating people on privacy issues and maintaining the safety of their computers. It is her firm belief that by spreading this information, she can empower web users to effectively protect their personal data and their devices from hackers and cybercriminals.


    • Hello fran,
      Happy New Year! 🙂 What was difficult for you in Step 2? Maybe I can walk you through the process.
      In step 3, can you tell me which IPs are you seeing? Some of them are safe, many of them are not, but I can’t really know until you tell me what they are.

    • Can you share these IPs? Some may be safe, while others are definitely part of the virus.
      If you have difficulties, download the scanner from one of our apps and it will help you locate the infected files.

          • Just delete them from the file. You erase the the IPs and close the file. They’ll, you just save it and it’s done. Tell me if this helped you 🙂

            • Guys that somehow helped me… But, every time when I start/restart my pc, the balloon appears (see the image). But, when I run the scan it shows no virus… On startup only it is appearing.. Help me Guys!!!!

            • Hello,

              Just to be clear you removed the suspicious IPs completely? Did you execute all others Steps in our guide as described? It is possible the virus might come back if it is not completely eradicated from your system.

    • Try downloading the scanner from our ads. It’s likely it can help you detect the infected files and you can hunt them down manually.

    • In theory this should have fixed the error, but apparently in your case, it didn’t. Download the scanner from one of our ads and try to hunt down the infected files. Destroy the root infection, then go back and attempt to fix the error with the same steps.
      Did that help?

    • To be honest, I haven’t encountered this scenario before. This shouldn’t happen. Try doing the same thing I told Josephie Vanspall to do (the comment below this one) and tell me if it worked. I honestly want to help, I’ll go research the issue, but I hope what I proposed works.

    • Hi Diego,

      Are you sure you ran the scan with administrator rights? This is very important.

      Please confirm you did before we explore other venues.

    • Hello again Diego,

      To be honest i am really stumped. This kind of message should NOT be occurring if you are in Safe Mode and running the operation as an administrator.

      One thing you can do is download a copy of Windows and try to repair your installation. It is slow and cumbersome solution, but it may also fix your DNSAPI.DLL problem.

      I’d very much like to hear from you if this works.

    • Hello Maison,

      I am not sure I understand you completely. Can you explain your issue in details and why do you believe it is related to the Trojan Patched.AO and DNSAPI.dll Missing Error?

    • Hi Mike,

      Those are real .dll files needed by windows, but apparently they have been modified by the virus (or rather the original file was replaced). You can fix this by doing a system repair with a Windows DVD. You can also try to manually replace them, but only if you can find a trustworthy source for the files.

    • Hi Velson,
      can you post us some of the IPs you think suspicious ? To open the list you can Right click on your Task Bar (usually can be found on the bottom of the desktop) and then click Task Manager or the easiest way is to click Ctrl+Shift+Esc. Then when you have the list of the processes in front of you, each one you think suspicious you can Right click it and then click Open file location. There you can delete it manually. Keep us posted for further assistance .

      • Hi TJ,
        you should definitely remove these IPs. Treat the file like a word file just highlight the IPs and click Backspace or Delete.

    • Under “localhost” Ips there are 8 IPs- directly below my localhost IP, there are 5 copies of my IP but with different host names. Those host names are
      union.baidu2019..com” And below those 5, there are 3 with the same IP, but different from the one that is associated with the above 5.
      How do I rid of these, permanently?

      • Hi Sesh,
        i would suggest to you to delete these IPs. Treat the hosts file like a normal text file and just delete these entries.

    • Hi again,
      at this point i would suggest to you to download our software from one of our banners above and use the free scan feature. The scanner will locate any infected file where you can delete manually. Keep us posted if you need further help.

    • question. how did I get this virus. I was in the middle playing in online game and I got booted off-line for three hours. I followed the steps you did after I was able to connect the Internet on my phone and when I realized the Internet was working again I followed most of the steps that has to do with CMD. I did not do the rest because you said it is risky and could ruin the computer. So far the CMD thing has worked but the problem is it reverts back to the PC having the same issue after I log off and I have to repeat this instruction over again when I want to get on my PC and connect to the Internet. Is there anyway to fix it?

      • Hi male,
        i would suggest to you to complete the guide. Remember every step you execute has to be in Safe Mode.

    • Have you tried the other steps like checking for malicious IP addresses in the hosts file or disabling any suspicious startup processes as instructed in the guide? If sfc/scannow is not able to repair the corrupted files, then you might be dealing with some sort of an unwanted software. If nothing helps, you can try repairing your Windows using your Windows installation disc – this usually repairs any corrupted files that you might have. However, know that if there is a Trojan infection, you’d fisrt need to remove the virus. To determine if your PC is infected, you can use the scanner tool mentioned in the guide.

    • Hello there, Andrew, here is what we advise you ro do: Right-click on your Firefox shortcut icon and go to properties. Then look at the text field next to Target. If there is anything written after .exe delete it and press OK. Also, did you try running the sfc/scannow command drom your command prompt?

    Leave a Comment