views:

280

answers:

1

I am working on a project that consists of installing some Visual Studio templates. Part of the requirement is that the VS executable must be called during Commit and Uninstall phases to make VS aware of the templates. I don't have much information or any proper examples to go on, and I'm pretty new to setup and deployment projects. So, my question is:

How, within the context of a Custom Action in a Setup and Deployment project, can I determine the location of the VS 2008 executable and call "devenv.exe /setup"? I know that this information exists in the registry (and I've located it), however I have no idea to add this as logic within a custom action.

Additionally, if anyone has any experience in this area and has any good links or any advice on the subject of things to know and be aware of, please feel free to chime in.

A: 

Two methods i used to simplify complex operation in deployment projects, which I believe can assist you:

  1. Create a external DLL, with Install/Uninstall methods, that will be called. example.
  2. Use Wix as an alternative.

With an installer class, you can easily check the registry for devenv location: HKLM\Software\Microsoft\VisualStudio\X.X\InstallDir

Am