|
本帖最后由 singel 于 2021-11-21 02:27 编辑
网盘里的右键菜单文件,我改成批处理导入发现几个菜单无效,如捕获WIM,只弹出主界面。是不是新版本改了参数?测试环境:正常WIN10系统
WIT2020右键菜单批处理.zip
(1.17 KB, 下载次数: 0)
- @echo off
- pushd %~dp0
- set WITDIR=%cd%
- set CommandStore=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell
- if "%PROCESSOR_ARCHITECTURE%"=="x86" set WIT2020=%cd%\WIT2020_x86.exe
- if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set WIT2020=%cd%\WIT2020_x64.exe
- for /f "tokens=1,2,*" %%i in ('REG QUERY HKEY_CLASSES_ROOT\.esd /ve ^| find /i ""') do set "esdve=%%k"
- if "%esdve%a"=="a" set esdve=esdfile
- for /f "tokens=1,2,*" %%i in ('REG QUERY HKEY_CLASSES_ROOT\.gho /ve ^| find /i ""') do set "ghove=%%k"
- if "%ghove%a"=="a" set ghove=ghofile
- for /f "tokens=1,2,*" %%i in ('REG QUERY HKEY_CLASSES_ROOT\.iso /ve ^| find /i ""') do set "isove=%%k"
- if "%isove%a"=="a" set isove=Windows.IsoFile
- for /f "tokens=1,2,*" %%i in ('REG QUERY HKEY_CLASSES_ROOT\.wim /ve ^| find /i ""') do set "wimve=%%k"
- if "%wimve%a"=="a" set wimve=Windows.WimFile
- if "%1"=="" reg query "HKLM\SOFTWARE\Classes\Directory\shell\WIT2020" /v "MUIVerb">nul 2>nul&&goto :uninstall||goto :install
- exit
- :install
- reg add "HKLM\SOFTWARE\Classes\.esd" /f /ve /t REG_SZ /d "%esdve%"
- reg add "HKLM\SOFTWARE\Classes\.gho" /f /ve /t REG_SZ /d "%ghove%"
- reg add "HKLM\SOFTWARE\Classes\.iso" /f /ve /t REG_SZ /d "%isove%"
- reg add "HKLM\SOFTWARE\Classes\.swm" /f /ve /t REG_SZ /d "%wimve%"
- reg add "HKLM\SOFTWARE\Classes\.wim" /f /ve /t REG_SZ /d "%wimve%"
- reg add "HKLM\SOFTWARE\Classes\Directory\shell\WIT2020" /f /v "MUIVerb" /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\Directory\shell\WIT2020" /f /v "SubCommands" /t REG_SZ /d "WIT-Image-Installer;WIT-Image-Manager;WIT-Image-Capture;WIT-Cleanup-Mountpoints"
- reg add "HKLM\SOFTWARE\Classes\Drive\shell\WIT2020" /f /v "MUIVerb" /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\Drive\shell\WIT2020" /f /v "SubCommands" /t REG_SZ /d "WIT-Image-Installer;WIT-Image-Manager;WIT-Cleanup-Mountpoints"
- reg add "HKLM\SOFTWARE\Classes\%esdve%\shell\WIT2020" /f /v "MUIVerb" /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\%esdve%\shell\WIT2020" /f /v "SubCommands" /t REG_SZ /d "WIT-Image-Installer;WIT-Image-Manager;WIT-Image-Convert;WIT-Image-Optimize;WIT-Image-Verify;WIT-Cleanup-Mountpoints"
- reg add "HKLM\SOFTWARE\Classes\%esdve%\DefaultIcon" /f /ve /t REG_SZ /d "%WITDIR%\Part\.esd.ico"
- reg add "HKLM\SOFTWARE\Classes\%ghove%" /f /ve /t REG_SZ /d "Symantec Ghost Imaging"
- reg add "HKLM\SOFTWARE\Classes\%ghove%\shell\WIT2020" /f /ve /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\%ghove%\shell\WIT2020\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1""
- reg add "HKLM\SOFTWARE\Classes\%ghove%\DefaultIcon" /f /ve /t REG_SZ /d "%WITDIR%\Part\.gho.ico"
- reg add "HKLM\SOFTWARE\Classes\%isove%\shell\WIT2020" /f /v "MUIVerb" /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\%isove%\shell\WIT2020" /f /v "SubCommands" /t REG_SZ /d "WIT-Image-Installer;WIT-Image-Manager;WIT-Cleanup-Mountpoints"
- reg add "HKLM\SOFTWARE\Classes\%isove%\DefaultIcon" /f /ve /t REG_SZ /d "%%SystemRoot%%\System32\imageres.dll,-5205"
- reg add "HKLM\SOFTWARE\Classes\%wimve%\shell\WIT2020" /f /v "MUIVerb" /t REG_SZ /d "WIT2020"
- reg add "HKLM\SOFTWARE\Classes\%wimve%\shell\WIT2020" /f /v "SubCommands" /t REG_SZ /d "WIT-Image-Installer;WIT-Image-Manager;WIT-Image-Convert;WIT-Image-Optimize;WIT-Image-Verify;WIT-Cleanup-Mountpoints"
- reg add "HKLM\SOFTWARE\Classes\%wimve%\DefaultIcon" /f /ve /t REG_SZ /d "%WITDIR%\Part\.wim.ico"
- reg add "%CommandStore%\WIT-Image-Installer" /f /ve /t REG_SZ /d "系统安装"
- reg add "%CommandStore%\WIT-Image-Installer\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1""
- reg add "%CommandStore%\WIT-Image-Manager" /f /ve /t REG_SZ /d "映像管理"
- reg add "%CommandStore%\WIT-Image-Manager\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v"
- reg add "%CommandStore%\WIT-Image-Convert" /f /ve /t REG_SZ /d "格式转换"
- reg add "%CommandStore%\WIT-Image-Convert\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v /mc"
- reg add "%CommandStore%\WIT-Image-Optimize" /f /ve /t REG_SZ /d "映像优化"
- reg add "%CommandStore%\WIT-Image-Optimize\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v /mo"
- reg add "%CommandStore%\WIT-Image-Verify" /f /ve /t REG_SZ /d "映像校验"
- reg add "%CommandStore%\WIT-Image-Verify\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v /mv"
- reg add "%CommandStore%\WIT-Image-Capture" /f /ve /t REG_SZ /d "捕获.WIM"
- reg add "%CommandStore%\WIT-Image-Capture\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v /mp"
- reg add "%CommandStore%\WIT-Cleanup-Mountpoints" /f /ve /t REG_SZ /d "清理挂载"
- reg add "%CommandStore%\WIT-Cleanup-Mountpoints\Command" /f /ve /t REG_SZ /d ""%WIT2020%" "%%1" /v /cm"
- goto :eof
- :uninstall
- reg delete "HKLM\SOFTWARE\Classes\Directory\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\Drive\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\%esdve%\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\%esdve%\DefaultIcon" /f
- reg delete "HKLM\SOFTWARE\Classes\%ghove%" /f
- reg delete "HKLM\SOFTWARE\Classes\%ghove%\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\%ghove%\DefaultIcon" /f
- reg delete "HKLM\SOFTWARE\Classes\%isove%\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\%isove%\DefaultIcon" /f
- reg delete "HKLM\SOFTWARE\Classes\%wimve%\shell\WIT2020" /f
- reg delete "HKLM\SOFTWARE\Classes\%wimve%\DefaultIcon" /f
- reg delete "%CommandStore%\WIT-Image-Installer" /f
- reg delete "%CommandStore%\WIT-Image-Manager" /f
- reg delete "%CommandStore%\WIT-Image-Convert" /f
- reg delete "%CommandStore%\WIT-Image-Optimize" /f
- reg delete "%CommandStore%\WIT-Image-Verify" /f
- reg delete "%CommandStore%\WIT-Image-Capture" /f
- reg delete "%CommandStore%\WIT-Cleanup-Mountpoints" /f
- goto :eof
复制代码
|
|