[Note: The is my 500th blog post!] You will sometimes need to find the version of the installed SQL Server instance. This is easily accomplished by running a simple query against the instance.
This will return the version information.
You might need to know more information, and this article by Ahmad Osama does a good job of describing the required scripts.