Files
quick-xmake/script/quick-xmake-uninstall.bat
2026-03-07 23:01:32 +08:00

61 lines
2.2 KiB
Batchfile

@echo off
setlocal
title Quick XMake 右键菜单卸载
echo =========================================
echo Quick XMake - 右键菜单卸载工具
echo =========================================
echo.
echo 正在卸载右键菜单...
echo.
REM 删除所有注册表项(从最深层开始)
echo 删除二级菜单命令...
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\run\command" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\template\command" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\set-release\command" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\set-debug\command" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\build\command" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\create\command" /f 2>nul
echo 删除二级菜单...
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\run" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\template" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\set-release" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\set-debug" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\build" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell\create" /f 2>nul
echo 删除一级菜单...
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake\shell" /f 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shell\quick-xmake" /f 2>nul
echo.
echo =========================================
echo 卸载成功!
echo =========================================
echo.
echo 已删除以下菜单项:
echo ├── Create
echo ├── Build
echo ├── Set debug mode
echo ├── Set release mode
echo └── Run
echo.
echo 注意事项:
echo 1. 您需要重启资源管理器才能看到菜单被移除
echo 2. 是否现在重启资源管理器?
echo.
choice /c YN /n /m "重启资源管理器 (Y/N): "
if %errorlevel% equ 1 (
echo 正在重启资源管理器...
taskkill /f /im explorer.exe >nul 2>&1
start explorer.exe
echo 资源管理器已重启
) else (
echo 您可以选择稍后手动重启资源管理器
)
echo.
pause
exit /b 0