Fixed - Antivirus keeps blocking the same file over and over Windows Problem: - Does your antivirus software keep blocking files that you are absolutely sure do not pose a threat to your system? Are you looking for the right solution? Don't wander anymore, you are in the right place. Antivirus software settings can be set to not allow potential threats to run on the system. In my case, when I tried to compile my cpp program, K7 Security, which is my current antivirus software, it kept blocking the . EXE generated file so you can't see the output. If you are facing such a problem, you have landed in the right place. Let's get started, okay?
- The cpp code I tried to compile is in the following screenshot.
- When I clicked on Compile and run option, my antivirus launched the following warning saying High security risk detected and kept blocking the exe file generated by the cpp compiler. No matter how many times you try to compile, it will always show you this error unless you manually rule it out. Read on to learn how to do this.
- Open your antivirus software. Mine is K7 security. click on settings. Find and click on the section that says Antivirus and Antispyware. If there is no such section in your antivirus software, look for a similar option.
- The next task is to find a link or button that says Click here to manage exclusions.
- From the newly opened window, click Add entry option.
- In the next step, you will be able to add the folder where your exe file will be created. For this, click Add folder and browse for the folder to add to the list.
- After adding the folder where the exe file will be generated, you can press the button ok button and exit.
- Now try to compile the program again. This time the exe file will open smoothly.
This method is not applicable to exe files only. It applies to any file or folder. You just have to add the corresponding file or folder to the exclusion list, that's it. Hope you found the article useful. If you have any questions regarding any of the steps, please let us know, we will be happy to assist you. Stay tuned for more tips, tricks and tips.