Registry Launch Condition in vs 2005 Deployment Project
I have a Visual Studio 2005 deployment project where I wanted to add a launch condition that would check the registry for a key before continuing. This article is really straight forward about how to do that: http://msdn2.microsoft.com/en-us/library/4awx1f1d(VS.80).aspx
However, every time I put the registry path in, it would never find the key upon install. So the key was located at something like HKLM\SOFTWARE\MyCompany\MyProduct and then there was a Value named Target Path that I wanted to check if it existed. My understanding (and perhaps I’m wrong) that keys are keys but the values are keys also (at least it seems that way when doing registry stuff through the .NET APIs in C#). So when I saw the following statement in the above article, I thought the property was for testing the value of a Value (AKA key?):
"Optionally, set the Value property to search for a specific value in the registry key."
Essentially I tried to append the Value to the RegKey path, because I thought the Value property was only for testing the value of the Value. If you want to test the value of the Value, you do it in the Condition property of the Property created by the registry launch condition. Is that as clear as mud?
This article is what cleared up my confusion (the 2nd post, the one by Phil Wilson): http://www.dotnet247.com/247reference/msgs/49/246890.aspx
I realized that a registry Value should not be part of the RegKey path.