@echo off
setlocal

REM 创建临时注册表文件
set TEMP_REG_FILE=%TEMP%\uninstall_context_menu.reg

echo Windows Registry Editor Version 5.00 > "%TEMP_REG_FILE%"
echo. >> "%TEMP_REG_FILE%"

REM 删除所有子菜单的注册表项
echo [-HKEY_CLASSES_ROOT\*\shell\Steganographier] >> "%TEMP_REG_FILE%"
echo [-HKEY_CLASSES_ROOT\Directory\shell\Steganographier] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hideMp4] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hideMp4\command] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hideMkv] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hideMkv\command] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reveal] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reveal\command] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\openSteganographier] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\openSteganographier\command] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\modifyHash] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\modifyHash\command] >> "%TEMP_REG_FILE%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\openHashModifier] >> "%TEMP_REG_FILE%"
echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\openHashModifier\command] >> "%TEMP_REG_FILE%"

REM 添加删除文件夹空白处右键菜单项的指令
echo [-HKEY_CLASSES_ROOT\Directory\Background\shell\openSteganographier] >> "%TEMP_REG_FILE%"
echo [-HKEY_CLASSES_ROOT\Directory\Background\shell\SteganographierAndHashModifier] >> "%TEMP_REG_FILE%"

REM 导入注册表
regedit /s "%TEMP_REG_FILE%"

REM 删除临时注册表文件
del "%TEMP_REG_FILE%"

REM 
REM ---------------------------------------------
REM --- 删除卸载程序注册信息 ---
REM ---------------------------------------------

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SteganographierGUI" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SteganographerGUI" /f

echo 卸载注册信息已清除。

echo Uninstallation complete! 
endlocal