However you could be running an instance of SQL 7 and SQL 2000 on the same box. How do you want to determine the correct file to compare with? Keep in mind, as well, versions can be off due to HotFixes and ServicePacks. Not all files may have the same verions number and I haven't seen a DB of all the versions and where they come in at.
Also, it can be done with File System Objects in VB with the method GetFileVersionInfo. Don't have any examples here.