A. The easiest way to check for Vista is to use the following WMI query:

select * from Win32_OperatingSystem where Caption like '%Vista%'

Simply build that query into a WMI Filter via the GPMC.