views:

73

answers:

2

I need to deploy a new item/project template and I found out that the way to do it is to copy it to [Visual Studio folder]\Common7\IDE\ItemTemplates.

How can I find where VS was installed (in my case VS2010)?

WiX code will be welcomed...

+1  A: 

Part of the answer:

You're going to need to query the registry to get the path - this is the relevant bit of the help from the wix site: http://wix.sourceforge.net/manual-wix3/read_a_registry_entry.htm

Most of the rest:

Path appears to be somewhere in HKCU (current user) - specifically a value here: HKEY_CURRENT_USER\software\microsoft\visualstudio\10.0_Config which has a key InstallDir that should give you what you want (or close enough).

Not sure if you should be installing there or in the user's template directories but those are also in the registry (under 10.0 rather than 10.0_Config)

Murph
+2  A: 

I suppose this is what you need.

Yan Sklyarenko
Nice +1 - my answer is generic, yours is better (-:
Murph