Check for AVX 2 Support on Launch

I have a JUCE application which relies on the CPU having AVX 2 support in order to run an external library which is built with AVX 2 acceleration. The problem I’m running into is that if the app is run on a device that doesn’t have AVX 2, it encounters illegal instructions before I am able check for AVX 2 support in my JUCE code to show a friendly error/exit. Does anyone know what’s the earliest point I can get this check to run in JUCE?

I do this during the installation process.

Nice! What installer framework are you using? I was just shipping an .exe but looking to add a simple installer. Was looking at Inno because it looked easier than MSIX.

Yeah, I think you can use that.
I wrote a very basic command line tool which returns true if the AVX is supported, then I execute this tool from the installer.