Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Check sql server express 2005 or 2008 is installed

Author  Topic 

winman
Starting Member

26 Posts

Posted - 2013-02-11 : 07:21:35
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
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-02-11 : 07:45:17
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
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-02-11 : 08:52:54
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
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-02-12 : 01:47:17
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
   

- Advertisement -