The solution listed in this article will work on most MacOSs including High Sierra.

Allow a Single App From Undefined Developers

If you want to install just one specific app from an undefined developer you need to do the following steps. Now your app will install as usual. However, this procedure will allow installing only the current app. Any app from an undefined developer that you would like to run in future will be declined. For allowing all future installations check the following section.

Allow All Apps From Undefined Developers

If you are aware of the risks and advantages and you want to allow all apps from undefined developers to run, you should perform the following steps. After you finish this procedure, you can install any app from undefined developers on your Mac OS X Mountain Lion without any further adjustments.

Revert the Security Changes

If for any reason, you like revert the changes and you want to block apps from undefined developers from installing again, you can do that as well. To revert the changes, follow all the steps for from the previous section, but when you get to Step # 6 instead of selecting Allow From Anywhere, choose Mac App Store and identified developers. If a popup window appears, confirm your action and you are done. Now your Mac OS Lion will prevent you from installing apps from undefined developers again. Feel free to use the steps for enabling/disabling this feature in your Mac OS Lion, and always be aware of the risks that some apps from undefined developers might have.

How to Fix ‘The File Cannot Be Opened Because of a Header Error’ in Adobe…Fix: These files can’t be openedHow to Fix ‘Your Input Can’t be Opened’ Error on VLC?SOLVED: Microsoft Edge Can’t be opened using the built-in Administrator Account Fix  Can t be opened because it is from an unidentified developer - 69Fix  Can t be opened because it is from an unidentified developer - 29Fix  Can t be opened because it is from an unidentified developer - 7Fix  Can t be opened because it is from an unidentified developer - 98Fix  Can t be opened because it is from an unidentified developer - 89Fix  Can t be opened because it is from an unidentified developer - 80Fix  Can t be opened because it is from an unidentified developer - 28Fix  Can t be opened because it is from an unidentified developer - 60Fix  Can t be opened because it is from an unidentified developer - 46Fix  Can t be opened because it is from an unidentified developer - 12