Installing Custom Project Templates for all users in Visual Studio Express
Aaanyway, thought I'd note down what I discovered about installing custom Project Templates into Visual Studio Express. (NB: This is different to installing into a user's "My Project Templates" folder; that only makes the template visible to one user.)
- Package your template up into a nice zip file using either the Visual Studio Wizard, or Microsoft's documentation
- Read the path given in the registry key
HKLM\SOFTWARE\Microsoft\VCSExpress\8.0\VSTemplate\ProjectkeyUserFolder - To that path, append the language string for the user's installed version. (For US English, that'll ususally be 1033. (i.e. append "\1033\" or whatever to the previously read path)
- Copy the zipped template file into that directory
- Locate the VCSexpress.exe executable. The location can be read from
HKLM\SOFTWARE\Microsoft\VCSExpress\8.0keyInstallDirin the registry, but you'll need to append the executable name to that. - Run VCSExpress.exe with the
/setupoption
Next time you run Visual Studio Express, and go to File | New Project, your project template should be listed. To uninstall the template, delete the .zip file from where you installed it, and re-run
VCSExpess.exe /setupProgramatically installing user controls in Visual Studio Express
Given how much trouble this was, and how clunkily it behaves, I rather suspect that Microsoft don't really want you doing this. Never mind.
I've only persuaded this to work for a single user at a time, which is a bit annoying. Anyway, to install some classes you've derived from Component:
- Get the path stored in
HKCU\Software\Microsoft\VCSExpress\8.0<\code> keyVisualStudioLocation - Append "\Controls" to that path
- To make your controls appear on a tab called $NAME, append "\$NAME\"
- Copy the assembly containing your Component(s) into that path
- Locate the VCSExpress.exe file, as described above
- Execute
VCSExpress.exe /command Tools.InstallCommunityControls


