Shortcut – empty solution template

Windows Explorer’s lets you create new files by right clicking and then going in to the New submenu.   You should already know this.

What you might not know is that you can add your template files. An empty Visual Studio solution for example. To do this:

  1. Create an empty solution (in the new project dialog go under “Other Project Types/Visual Studio Solutions”
  2. Copy the sln file to c:\windows\shellnew and rename it template.sln (to make step #5 easier)
  3. Open regedt32 go to HKEY_CLASSES_ROOT and find .sln
  4. Add a new key called ShellNew
  5. Add a string value to the key called FileName and set its value to “template.sln”

Now you can create new solutions by just right clicking wherever you need to setup a new solution.

You can do this for any file type you want. Just look in the registry and add the key. Windows just copies the file you specify from the shellnew folder to the new location. So you could create a C# class template with all your favorite stuff and then just make new copies whenever you need.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s