If you get this error when installing Microsoft Security Scanner:
An error has occurred
It’s probably because you are trying to install Microsoft Safety Scanner to a version of Windows that doesn’t support it. An example would be Windows PE, or a copy of Windows with the wrong architecture (the x64 instead of x32 version of Microsoft Safety Scanner). It seems that you also get An error has occurred if you try to install it on Windows 10.