if you are still working on your installer,
could be helping you.
run the following statement with osqlor your preferred way of running DB-Scripts from the commandline:
SELECT SERVERPROPERTY ('productlevel')
depending on what is installed, you should get something like
"RTM" or "SQL Server 2005" so you can go further with this return val.
I haven't tested it yet, because i currently hav no SQL2005 here, but the statement works under SQL2000 too.
have a look at the link for further informations about the ServerProps.