Skip to content

Repository files navigation

NewMenuManager v1.00.1

Windows Desktop Right-Click "New" Menu Manager
Windows 桌面右键"新建"菜单管理器

License .NET Author

Manage what appears in your Windows right-click → New menu.
管理 Windows 桌面右键 → 新建菜单中的文件类型。


Features | 功能

  • View all "New" menu entries and their registry paths | 查看所有新建菜单条目及注册表位置
  • Enable / Disable / Delete any file type | 启用 / 禁用 / 删除任意文件类型
  • Add custom file types (empty file, from template, or via command) | 添加自定义文件类型(空文件、模板、命令)
  • Backup & Restore registry configuration to JSON | 备份和恢复注册表配置
  • Restore Windows defaults with one click | 一键恢复 Windows 系统默认值
  • CLI tool (nmcli) for scripting and automation | 命令行工具支持脚本自动化
  • Bilingual UI Chinese / English toggle (Ctrl+L) | 中英双语界面切换
  • Dark / Light theme follows system or manual toggle | 暗黑 / 亮色主题

Screenshot | 截图

NewMenuManager Screenshot

Quick Start | 快速开始

Prerequisites | 环境要求

  • Windows 10 1809+ / Windows 11
  • .NET 9.0 SDK
  • Administrator rights (for registry modification)

Run from source | 从源码运行

# Clone
git clone https://github.com/dboycht/NewMenuManager.git
cd NewMenuManager

# Build & Run GUI
dotnet run --project NewMenuManager.GUI

# Or use the setup script
.\setup.ps1          # PowerShell (Chinese/English interactive menu)
.\setup.bat          # Batch launcher

Build & Package | 编译打包

# Build only
.\build.ps1
.\build.bat

# Publish as single-file executables to .\publish\
.\publish.ps1
.\publish.bat

# Package to folder (pure English script)
.\package.ps1

CLI Usage | 命令行使用

nmcli list                          # List all entries
nmcli list --json                   # JSON output
nmcli info .txt                     # Show details
nmcli enable .md .py                # Enable entries
nmcli disable .tmp                  # Disable entries
nmcli delete .old                   # Delete entries
nmcli add .md --name "Markdown"     # Add new type
nmcli add .py --type command --command "python \"%1\""
nmcli backup                        # Create backup
nmcli restore --defaults            # Restore defaults
nmcli scan                          # Diagnostic scan

Scripts | 脚本说明

Script Purpose 用途
setup.ps1 / setup.bat Interactive menu: build, run, publish 交互菜单:编译、运行、发布
build.ps1 / build.bat Build the solution 编译项目
run.ps1 / run-gui.bat / run-cli.bat Quick launch GUI or CLI 快速启动
publish.ps1 / publish.bat Publish single-file exe to .\publish\ 发布为单文件
package.ps1 Package all outputs to .\dist\ folder 打包到发布文件夹

Project Structure | 项目结构

NewMenuManager/
├── NewMenuManager.sln
├── NewMenuManager.Core/          # Core library (models + services)
├── NewMenuManager.GUI/           # WinForms desktop app
│   ├── Forms/
│   │   ├── MainForm.cs           # Main window with entry list
│   │   ├── AddTemplateForm.cs    # Add new file type dialog
│   │   ├── BackupRestoreForm.cs  # Backup management dialog
│   │   ├── SettingsForm.cs       # Preferences dialog
│   │   └── AboutForm.cs          # About dialog
│   ├── Loc.cs                    # Bilingual helper (Chinese/English)
│   ├── Program.cs                # Entry point + dark mode
│   └── logo.ico                  # Application icon
├── NewMenuManager.CLI/           # CLI tool (nmcli.exe)
├── NewMenuManager.ShellExt/      # Shell extension (optional)
├── setup.ps1 / setup.bat         # One-click launcher scripts
├── build.ps1 / build.bat         # Build scripts
├── publish.ps1 / publish.bat     # Publish scripts
├── package.ps1                   # Package script
└── README.md

How It Works | 工作原理

The Windows "New" context menu reads from registry:

HKEY_CLASSES_ROOT
└── .<extension>              e.g. .txt
    ├── (Default) = <ProgID>  e.g. txtfile
    └── ShellNew
        ├── NullFile = ""      → creates empty file
        ├── FileName = "..."    → copies template
        └── Command = "..."     → runs program

NewMenuManager safely reads/writes these keys:

  • Enable: rename ShellNew_DisabledShellNew
  • Disable: rename ShellNewShellNew_Disabled (reversible)
  • Delete: remove ShellNew key (auto-backup first)
  • Add: create extension → ProgID → ShellNew keys

Changelog | 更新日志

v1.00.1 (2026-07-27)

  • Initial release | 首次发布
  • View / Enable / Disable / Delete New menu entries
  • Add custom file types (NullFile / FileName / Command)
  • Backup & Restore registry configuration
  • CLI tool (nmcli) with 12 commands
  • Bilingual UI (Chinese / English) with Ctrl+L toggle
  • Dark / Light theme support
  • Shell extension integration (optional)
  • Inline field descriptions in Add dialog
  • ToolTips with detailed explanations on all controls
  • Registry safety: auto-backup before changes, reversible disable

Author | 作者

dboychtgithub.com/dboycht/NewMenuManager

License | 许可证

MIT License — see LICENSE for details.

About

New File Menu Manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages