This is a definite gotcha. I was writing a NAnt task that uses the registry to check for the existence of certain installed programs. I hit a problem where when I ran the task directly, it worked fine, but when I ran it through NAnt, it failed. Turns out this…