• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

How to detect if a SQL/MSDE or mySQL is installed?

How to detect if a SQL or MSDE or mySQL is installed on a local machine?
0
kennon2000
Asked:
kennon2000
  • 3
  • 2
1 Solution
 
YurichCommented:
you can check the registry but it won't help if it's been installed/uninstalled.

you can try to search for files but it won't work if the custom names and paths have been used.

regards
0
 
kennon2000Author Commented:
For the method of checking registry, what you means by "it won't help if it's been installed/uninstalled"?
I only need to know the existence of SQL/mySQL at the time when a CheckDBExistence() method is used.
Thanks
0
 
YurichCommented:
I meant that registry entries would still probably exist even if MySql was uninstalled... In which case it's not of much help for you.

Presuming that most of the people use default paths, you can do both checking, the registry and the files, something like File.Exists( yourCheckingPath), in which case you get more accurate result than just using registry. Yet not absolute.

regards
0
 
YurichCommented:
well, using the way I suggested you can achieve what was asked...
0
 
kennon2000Author Commented:
I am actually using the method of listing all the services that are running and see whether the databases exist.  The services are listed by "Net Start"  or Process class in .Net.
Thanks Yurich anyway and I will give you the point.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now