• The default data path is stored in the registry. Here are some answers, but it's the one that reads the registry that you want

    http://stackoverflow.com/questions/1883071/how-do-i-find-the-data-directory-for-a-sql-server-instance