Retrieve the BizTalk Installation Path From the Registry

Recently, I wrote a utility to extract dehydrated messages from a BizTalk 2006 environment. As part of the process, I needed to figure out what folder the BizTalk software was installed in. Below is a function I quickly wrote to retrieve the BizTalk installation path from the Windows registry. I thought it might be something useful to share.

public string GetBizTalkInstallationFolder()
{
    string biztalkFolder = String.Empty;

    using (RegistryKey biztalkKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\BizTalk Server\\3.0"))
    {
        biztalkFolder = biztalkKey.GetValue("InstallPath", String.Empty).ToString();
    }

    return biztalkFolder;
}

Leave a Reply

Your email address will not be published. Required fields are marked *