SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Check sql server express 2005 or 2008 is installed
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

winman
Starting Member

26 Posts

Posted - 02/11/2013 :  07:21:35  Show Profile  Reply with Quote
I am creating an application which requires installation of sql server express 2005 or 2008 to work. So my application should check whether sql server is already installed on my customer PC and if it is not installed then i have to install it through my application. So how can i check sql server is installed or not in their PC?

bandi
Flowing Fount of Yak Knowledge

India
2210 Posts

Posted - 02/11/2013 :  07:45:17  Show Profile  Reply with Quote
If your front-end is C#, then refer below link
http://stackoverflow.com/questions/2443001/check-if-sql-server-is-installed-on-a-machine-through-c-sharp

--
Chandu
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3649 Posts

Posted - 02/11/2013 :  08:52:54  Show Profile  Reply with Quote
Another alternative would be to use the ServiceController class - http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx

It will let you check if the service is installed, and whether it is started, and if not started you will be able to start it using the methods in this class.

As for installing the SQL Express, the user will need to respond to the SQL installer dialogs and accept the license agreement. So you would need to have the user interact with the installation - it cannot be an unattended install process.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2062 Posts

Posted - 02/12/2013 :  01:47:17  Show Profile  Visit jackv's Homepage  Reply with Quote
You could use Powershell remote registry serach - http://www.sqlserver-dba.com/2012/06/list-sql-server-instances-with-powershell-remote-registry-search.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000