I have created a task for MSBuild that is to be used by developers and would like to create an installer to install the task and the associated .targets file into the MSBuild extensions folder in Program Files (usually C:/Program Files/MSBuild on 32-bit XP).
To do this properly, I would like to ask the system for that folder location at installation time – is there a registry key that provides this information or some other installer property? I intend to use WiX for the installation.
Best Answer
Wix itself has a MSBuild task so I think its best to see how they did it, the relvent source is Toolset.wxs (Google Code Search).
Look at the part where they defined the MSBuild Folder:
This will install the Wix MsBuild task (WixTasks.dll) under \Program Files\MSBuild\Microsoft\Wix