I agree that checking the file would be better for this purpose, but we do check the registry for a lot of other things, so I'm sure I will be using this technique down the road...
I'll probably add a new table to the database for version numbers to compare so the view doesn't have to be altered with each application upgrade.
Got it..... This query will show all computers that have the wrong version, or do not have the software installed.
SELECT TOP 100 PERCENT dbo.tblComputers.Computername as Computer FROM dbo.tblComputers LEFT JOIN dbo.tblRegistry ON dbo.tblComputers.Computername = dbo.tblRegistry.Computername AND (dbo.tblRegistry.Regkey='HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\AD957430A12E5974FB3B6CD671AF1D38\InstallProperties') AND (dbo.tblRegistry.Valuename='DisplayVersion') WHERE (dbo.tblRegistry.Value is null OR NOT dbo.tblRegistry.Value = '7.0.7') ORDER BY dbo.tblComputers.Computername