qe
跳转到导航
跳转到搜索
A Windows Batch script for personal uses only (some common scenarios for unarchiving a handful of specific or nonspecific CLI applications to %PATH%), attached with a shell-injection registry file down below. I have no desire to explain this one and it is subject to frequent revisions.
The batch
qe.bat
@echo off
chcp 65001 >nul
set fn=%~nx1
if /i "%fn:~0,5%"=="deno-" goto f
if /i "%fn:~0,8%"=="exiftool" goto e
if /i "%fn:~0,5%"=="fart-" goto f
if /i "%fn:~0,6%"=="ffmpeg" goto f
if /i "%fn:~0,12%"=="ImageMagick-" goto i
if /i "%fn:~0,5%"=="flac-" goto l
if /i "%fn:~0,6%"=="jpegli" goto j
if /i "%fn:~0,4%"=="jxl-" goto jx
if /i "%fn:~0,5%"=="lame3" goto f
if /i "%fn:~0,7%"=="libwebp" goto w
if /i "%fn:~0,4%"=="mpv-" goto m
if /i "%fn:~0,12%"=="NeroAACCodec" goto n
if /i "%fn:~0,6%"=="nircmd" goto c
if /i "%fn:~0,5%"=="oggde" goto g
if /i "%fn:~0,5%"=="oggen" goto g
if /i "%fn:~0,6%"=="opencc" goto oc
if /i "%fn:~0,7%"=="optipng" goto f
if /i "%fn:~0,5%"=="opus-" goto o
if /i "%fn:~0,7%"=="pandoc-" goto f
if /i "%fn:~0,4%"=="qaac" goto q
if /i "%fn:~0,7%"=="QTFiles" goto qt
if /i "%fn:~0,10%"=="resource_h" goto r
if /i "%fn:~0,8%"=="rustormy" goto rw
if /i "%fn:~0,4%"=="SoX-" goto f
goto z
:c
7z rn %1 nircmdc.exe ncmd.exe
7z e -y %1 ncmd.exe -oC:\_c\
del %1
goto :eof
:e
7z rn %1 "%~n1\exiftool_files" exiftool_files
7z rn %1 "%~n1\exiftool(-k).exe" exiftool.exe
7z x -y -xr!*.txt %1 exiftool_files exiftool.exe -oC:\_c\
del %1
goto :eof
:f
7z e -y %1 *.exe *.dll -r -oC:\_c\
del %1
goto :eof
:i
7z e -y %1 *.exe *.dll *.icc *.xml -r -oC:\_c\magick\
del %1
goto :eof
:oc
7z e -y %1 -oC:\_c\oc\
del %1
goto :eof
:g
7z rn %1 oggenc2.exe ogge.exe
7z rn %1 oggdec.exe oggd.exe
7z e -y %1 *.exe -r -oC:\_c\
del %1
goto :eof
:j
7z e -y %1 *.exe *.dll -r -oC:\_c\jxl\
del %1
goto :eof
:jx
7z rn %1 %1 %~n1-1.zip
7z e -y %1 %~n1-1.zip
if exist %~n1-1.zip (
7z e -y %~n1-1.zip *.exe *.dll -r -oC:\_c\jxl\
del %~n1-1.zip
) else (
7z e -y %1 *.exe *.dll -r -oC:\_c\jxl\
)
del %1
goto :eof
:l
7z rn %1 "%~n1\Win64\flac.exe" flac.exe
7z rn %1 "%~n1\Win64\libFLAC.dll" libFLAC.dll
7z rn %1 "%~n1\Win64\libFLAC++.dll" "libFLAC++.dll"
7z rn %1 "%~n1\Win64\metaflac.exe" metaflac.exe
7z e -y %1 flac.exe libFLAC.dll "libFLAC++.dll" metaflac.exe -oC:\_c\
del %1
goto :eof
:m
7z x -y %1 mpv.exe d3dcompiler_43.dll -oC:\_c\
del %1
goto :eof
:n
7z rn %1 "win32\neroAacTag.exe" aact.exe
7z rn %1 "win32\neroAacDec.exe" aacd.exe
7z rn %1 "win32\neroAacEnc.exe" aace.exe
7z e -y %1 *.exe *.dll -r -oC:\_c\
del %1
goto :eof
:o
7z d %1 -r "*Win32"
7z e -y %1 *.exe *.dll -r -oC:\_c\
move /y C:\_c\opusdec.exe C:\_c\opusd.exe
move /y C:\_c\opusenc.exe C:\_c\opuse.exe
move /y C:\_c\opusinfo.exe C:\_c\opusi.exe
del %1
goto :eof
:q
7z rn %1 "%~n1\x64\qaac64.exe" qaac.exe
7z rn %1 "%~n1\x64\refalac64.exe" refalac.exe
7z rn %1 "%~n1\x64\libsoxr64.dll" libsoxr64.dll
7z rn %1 "%~n1\x64\libsoxconvolver64.dll" libsoxconvolver64.dll
7z e -y %1 qaac.exe refalac.exe libsoxr64.dll libsoxconvolver64.dll -oC:\_c\
del %1
goto :eof
:qt
7z e -y %1 *.exe *.dll -r -oC:\_c\qtfiles64\
del %1
goto :eof
:r
7z rn %1 ResourceHacker.exe rh.exe
7z e -y %1 *.exe -r -oC:\_c\
del %1
goto :eof
:rw
7z rn %1 "%~n1\rustormy.exe" w.exe
7z e -y %1 *.exe -r -oC:\_c\
del %1
goto :eof
:w
7z e -y %1 *.exe *.dll -r -oC:\_c\webp\
del %1
goto :eof
:z
7z e -y %1 *.exe *.dll -r -oC:\_c\
goto :eof
The REG file
Add_Quick_Extract_to_Context_Menu.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.7z\shell\qe]
@="Quick extract to C:\\_c"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.7z\shell\qe\command]
@="C:\\_c\\qe.bat \"%1\""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.zip\shell\qe]
@="Quick Extract to C:\\_c"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.zip\shell\qe\command]
@="C:\\_c\\qe.bat \"%1\""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.rar\shell\qe]
@="Quick Extract to C:\\_c"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.rar\shell\qe\command]
@="C:\\_c\\qe.bat \"%1\""