Use Windows explorer context menu to initialize new directories from project templates
Table of Contents
DirTemplateExtension is a COM server shell extension that integrates into Windows Explorer right-click context menu for directories and directory backgrounds. It allows you to boostrap new project directories from predefined templates. Template directories are defined in user's My Documents subdirectory DirTemplates
as a first level subdirectories. Each template can contain any number of files and subdirectories regardless of depth.
You may place a file named project.png
in template directory and extension will load it under Windows Explorer context menu item.
Shell extension will automatically pick up any changes in template directory names and render context submenus accordingly. Extension supports multiple directory selection.
Extension logs standard information, warning and error logs to Windows System Event log under Application logs for event source of DirTemplateExtension.
Create an empty file .debug
in template directory {User}\MyDocuments\DirTemplates
. This file will signal extension to start outputting debug logs to a local file {User}\MyDocuments\DirTemplates\debug.log
. When finished debugging you may delete .debug
file and extension will stop logging.
Checkout this project and open it with C# supported IDE. You may use VSCode or VisualStudio Community.
Make sure you have .NET SDK 4.6.x or similar that is supported by the SharpShell project. Download SharpShell tools and libraries from SharpShell and place them in SharpShellTools subdirectory. You may want to use Nuget packages for initializing SharpShell in your project. SharpShell tools are needed for building an installer and COM debugging but are not mandatory for a DLL build. SharpShell libraries are mandatory. To create installer you need to install InnoSetup.
- Checkout source as a new VisualStudio project.
- Clone the repo
git clone https://github.com/tezvi/DirTemplateExtension.git
- Download SharpShell library and SharpShell tools.
- Build VisualStudio project for CPU architecture that is supported by your SharpShell library version.
- Compile installer by using InnoSetup IDE.
- Install compiled EXE installer on target computer.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/tezvi/DirTemplateExtension