I’ve googled a day but the question is still question: how to detect SQL Server 2008 R2 on various Windows versions:
- via registry (would be our favorite solution),
- via file system,
- via installer exit code?
Installer developed with NSIS. Some additional informations:
Registry
Samples on the net are out of date or simply improper. Not just R2 but 2k8 detection is problematic too.
File system
I have no idea what files are especially from 2k8 R2.
Installer exit code
In some cases exits without error code (i.e. prerequisites missing).
you could use the WMI to listy all the microsoft product installed and then you could look foe the one you need