I am trying to write a program in Java which has to check if SQL Server (2008) is installed on a particular machine. Is checking the registry entry the only solution? I prefer a file-based solution.
Currently, I am checking for the presence of OSQL.exe (which I use to execute queries and SQL scripts) in the <Installation Path>\100\Tools\Binn folder. What does the 100 specify? Can it be hardcoded in the program, or will I have to search for the OSQL.exe file starting from the installation path?