Hi,
I had the same problem so got this script from here: https://www.reddit.com/r/Piracy/comments/bq78ji/idm_popup_fake_serial/ Dedcided to share coz It's worked for me really well.
I developed a script that resolves the problem and clean all IDM modifications.
it is a ".bat" file (you can open it with a text editor to understand it) try to run it as an admininstrator.
you have just to download "subinacl.exe" (https://www.microsoft.com/en-in/download/details.aspx?id=23510) from a safe source, and put it in the same directory of the script because the script run it one time at the begining of the script.
Feel free to commit any changes to this as needed.
Enjoy!!!