Can anyone point me to a vbscript (using WMI) to find out the installed SQL Server version. I have a scenario where either SQL Server 2008 R2 or SQL Server 2012 could be installed on a machine.
相关问题
- sql execution latency when assign to a variable
- How to Debug/Register a Permanent WMI Event Which
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
- How can I convert a OLE Automation Date value to a
Based on the code in the first Google search result here:
Note that WMI is not the fastest way to do this. Have you considered checking the registry directly instead of going through WMI?
UPDATE given OP's solution using the registry instead, and with the assumption that exactly one of 2008R2 or 2012 could be installed: