locked
Templates RRS feed

  • Question

  • Hi all, I've got a question.

    I've created an XNA template I'd like to be able to distribute to people so that it's added to the 'Visual Studio installed templates' section (like TorqueX does, and like the XNA install did).

    I know this can be done by putting the template zip file in the \Common7\IDE\VCSExpress\ProjectTemplates folder.

    After putting it into the folder, you can get it to show up in the window by running
    \Common7\IDE\VCSExpress.exe /installvstemplates from the command prompt.

    My question is, does anyone know how I can go about finding where VCExpress is installed on a user's machine? I was thinking of making a batch file or something that would copy the file and run the program, but I'm not seeing an Environment Variable that points to the install folder for VCExpress.

    Help would be greatly appreciated.
    Monday, March 5, 2007 4:39 AM

Answers

  • You do not have to go to that effort, the best way is to build an installer for the template, the same way the starterkits are distributed...

    Have a look at this post it will show you how to do it.

    Monday, March 5, 2007 6:52 AM

All replies

  • Are you allowed to read from the registry?

    HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\-->InstallDir

    Monday, March 5, 2007 5:35 AM
  • Hey, thanks!

    I suppose I could make a C# installer program that reads HKLM\SOFTWARE\Microsoft\VCSExpress\8.0\InstallDir and work from there.

    I didn't even know that key existed. Now I guess it's just down to learning how to read the registry.

    Thanks a bundle for that help.


    Monday, March 5, 2007 5:50 AM
  • You do not have to go to that effort, the best way is to build an installer for the template, the same way the starterkits are distributed...

    Have a look at this post it will show you how to do it.

    Monday, March 5, 2007 6:52 AM
  • Hey Glenn, that worked wonderfully, except for one small problem.

    The vsi installed it so that it showed up in the My Templates section. Any idea how I can change it so it shows up in the Visual Studio Installed Templates section?      
    Monday, March 5, 2007 8:05 AM
  •  

    I think from memory the only templates that get added there are at install time, all custom ones fall under the my templates... But I might be wrong :)

    Monday, March 5, 2007 8:08 AM
  • That's truly unfortunate :(

    Thanks a bundle for your help.
    Monday, March 5, 2007 8:11 AM