I have never tried creating MSI package, but what I can tell you is that you can check for one standard bit flag that tell if OS is
embedded or not.
You can read it with API GetVersionEx.
This could be fooled easily, also who knows how this file will be called in LHe. But embedded bit should stay present.
Although I wonder what XP SP2 POS will report.
Well.. The embedded bit approach can also be fooled.
I guess it is just a registry value (bit?). So, you can temporarily change it while running a particular installation.
If we start thinking about how to prevent the installation from a hacker (not end user), it is going to (should) be a different
story, different implementation, different design.