无忧启动论坛
标题:
7z注册右键菜单批处理
[打印本页]
作者:
lhc0688
时间:
2022-4-5 13:34
标题:
7z注册右键菜单批处理
7z一般都是用绿色版,今天想找个自动注册右键的脚本,发现基本都是reg方式的,这样有一个问题:那就是7z所在路径,reg中要先手动修改成自己的路径,做成批处理方式,就可以简单默认当前7z所在路径,放在7z程序文件夹里就可以完成右键注册。
7z-Register.rar
(746 Bytes, 下载次数: 204)
2022-4-5 13:33 上传
点击文件名下载附件
下载积分: 无忧币 -2
作者:
lhc0688
时间:
2022-4-5 13:36
这样 7z可以随便改动位置,PE里也一样,这样改PE也方便。
作者:
2011wolfsina
时间:
2022-4-5 13:46
这个32位和64位通用吗?
其实很多PE里都有,7z-Reg.cmd也有,而且论坛有个reg转cmd的也很好用。
作者:
liuyanjun
时间:
2022-4-5 13:56
感谢分享 收藏了
作者:
lhc0688
时间:
2022-4-5 13:57
2011wolfsina 发表于 2022-4-5 13:46
这个32位和64位通用吗?
其实很多PE里都有,7z-Reg.cmd也有,而且论坛有个reg转cmd的也很好用。
还真不知道64、32是否通用,因为自己电脑是64的,还真不知道32版之间差别。这个就是pe里的reg转成cmd的,主要是解决默认当前路径问题,PE里reg、cmd一般都是固定路径。
作者:
lhc0688
时间:
2022-4-5 13:59
就是把reg里面的固定路径,替换成%~dp0
作者:
wanzejun
时间:
2022-4-5 14:27
谢谢分享!!!
作者:
创新科技2015
时间:
2022-4-5 15:31
谢谢分享!!!
作者:
9zhmke
时间:
2022-4-5 16:47
我也常把7Z新版打包,我是这样写的:
@pushd "%~dp0" >nul 2>&1
CD /D %~DP0
ECHO 程序运行中,请稍等.....
if defined ProgramFiles(x86) goto NEXT
if not exist 32_7zFM.exe goto NEXT
del 7z.dll 7z.exe 7zFM.exe 7zG.exe 7-zip.dll>nul 2>nul
ren 32_7z.dll 7z.dll
ren 32_7z.exe 7z.exe
ren 32_7zFM.exe 7zFM.exe
ren 32_7zG.exe 7zG.exe
copy /y 7-zip32.dll 7-zip.dll
:NEXT
set p=%cd:\=\\%
echo >green.reg Windows Registry Editor Version 5.00
echo >>green.reg [HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip]
echo >>green.reg "Path"="%p%\"
echo >>green.reg "Path32"="%p%\"
echo >>green.reg "Path64"="%p%\"
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip]
echo >>green.reg "Path32"="%p%\"
echo >>green.reg "Path64"="%p%\"
echo >>green.reg "Path"="%p%\"
echo >>green.reg "LargePages"=dword:00000000
echo >>green.reg "Lang"="zh-cn"
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\Compression]
echo >>green.reg "ShowPassword"=dword:00000000
echo >>green.reg "Level"=dword:00000005
echo >>green.reg "Archiver"="7z"
echo >>green.reg "EncryptHeaders"=dword:00000000
echo >>green.reg "ArcHistory"=hex:43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,\
echo >>green.reg 20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,37,00,2d,00,5a,00,69,00,70,00,5c,\
echo >>green.reg 00,4c,00,61,00,6e,00,67,00,2e,00,37,00,7a,00,00,00
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\Compression\Options]
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\Compression\Options\7z]
echo >>green.reg "Level"=dword:00000009
echo >>green.reg "Dictionary"=dword:20000000
echo >>green.reg "Order"=dword:00000111
echo >>green.reg "BlockSize"=dword:00000040
echo >>green.reg "NumThreads"=dword:00000003
echo >>green.reg "Method"="LZMA2"
echo >>green.reg "MemUse64"="90%"
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\FM]
echo >>green.reg "Viewer"=""
echo >>green.reg "Editor"=""
echo >>green.reg "Diff"=""
echo >>green.reg "ShowDots"=dword:00000000
echo >>green.reg "ShowSystemMenu"=dword:00000000
echo >>green.reg "ShowRealFileIcons"=dword:00000000
echo >>green.reg "FullRow"=dword:00000000
echo >>green.reg "ShowGrid"=dword:00000000
echo >>green.reg "AlternativeSelection"=dword:00000000
echo >>green.reg "SingleClick"=dword:00000000
echo >>green.reg "FolderShortcuts"=hex:
echo >>green.reg "FolderHistory"=hex:00,00
echo >>green.reg "PanelPath0"=""
echo >>green.reg "FlatViewArc0"=dword:00000000
echo >>green.reg "PanelPath1"=""
echo >>green.reg "FlatViewArc1"=dword:00000000
echo >>green.reg "ListMode"=dword:00000303
echo >>green.reg "Position"=hex:5e,01,00,00,90,01,00,00,90,03,00,00,04,03,00,00,00,00,00,00
echo >>green.reg "Panels"=hex:01,00,00,00,00,00,00,00,13,01,00,00
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\FM\Columns]
echo >>green.reg "RootFolder"=hex:01,00,00,00,00,00,00,00,01,00,00,00,04,00,00,00,01,00,00,00,\
echo >>green.reg a0,00,00,00
echo >>green.reg [HKEY_CURRENT_USER\Software\7-Zip\Options]
echo >>green.reg "CascadedMenu"=dword:00000000
echo >>green.reg "MenuIcons"=dword:00000001
echo >>green.reg "ContextMenu"=dword:00000367
echo >>green.reg "WorkDirType"=dword:00000000
echo >>green.reg "WorkDirPath"=""
echo >>green.reg "TempRemovableOnly"=dword:00000001
echo >>green.reg [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\7-Zip]
echo >>green.reg @="{23170F69-40C1-278A-1000-000100020000}"
echo >>green.reg [HKEY_CLASSES_ROOT\CLSID\{23170F69-40C1-278A-1000-000100020000}]
echo >>green.reg @="7-Zip Shell Extension"
echo >>green.reg [HKEY_CLASSES_ROOT\CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32]
echo >>green.reg @="%p%\\7-zip.dll"
echo >>green.reg "ThreadingModel"="Apartment"
echo >>green.reg [HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\7-Zip]
echo >>green.reg @="{23170F69-40C1-278A-1000-000100020000}"
echo >>green.reg [HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers\7-Zip]
echo >>green.reg @="{23170F69-40C1-278A-1000-000100020000}"
echo >>green.reg [HKEY_CLASSES_ROOT\Drive\shellex\DragDropHandlers\7-Zip]
echo >>green.reg @="{23170F69-40C1-278A-1000-000100020000}"
echo >>green.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\7-Zip]
echo >>green.reg @="{23170F69-40C1-278A-1000-000100020000}"
echo >>green.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
echo >>green.reg "{23170F69-40C1-278A-1000-000100020000}"="7-Zip Shell Extension"
echo >>green.reg [HKEY_CLASSES_ROOT\.7z]
echo >>green.reg @="7-Zip.7z"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.7z]
echo >>green.reg @="7z Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.7z\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.7z\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.7z\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.7z\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.arj]
echo >>green.reg @="7-Zip.arj"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.arj]
echo >>green.reg @="arj Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.arj\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.arj\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.arj\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.arj\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.cab]
echo >>green.reg @="7-Zip.cab"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.cab]
echo >>green.reg @="cab Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.cab\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.cab\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.cab\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.cab\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.lha]
echo >>green.reg @="7-Zip.lha"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.lha]
echo >>green.reg @="lha Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.lha\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.lha\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.lha\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.lha\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.rar]
echo >>green.reg @="7-Zip.rar"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.rar]
echo >>green.reg @="rar Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.rar\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.rar\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.rar\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.rar\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.001]
echo >>green.reg @="7-Zip.001"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.001]
echo >>green.reg @="001 Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.001\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.001\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.001\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.001\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg [HKEY_CLASSES_ROOT\.wim]
echo >>green.reg @="7-Zip.wim"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.wim]
echo >>green.reg @="wim Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.wim\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.wim\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.wim\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.wim\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
echo >>green.reg
echo >>green.reg [HKEY_CLASSES_ROOT\.zip]
echo >>green.reg @="7-Zip.zip"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.zip]
echo >>green.reg @="zip Archive"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.zip\DefaultIcon]
echo >>green.reg @="%p%\\7z.dll,9"
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.zip\shell]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.zip\shell\open]
echo >>green.reg @=""
echo >>green.reg [HKEY_CLASSES_ROOT\7-Zip.zip\shell\open\command]
echo >>green.reg @=""%p%\\7zFM.exe" "^%%1""
:BEGIN
regedit /s green.reg
del green.reg 2>nul
set p=单文件制作_x64
if not defined ProgramFiles(x86) set p=单文件制作_x86
set s_dir=D:\我的文档\系统设置\开始菜单\常用工具
if exist D:\我的文档\系统设置\开始菜单\. md %s_dir%
if not exist "%s_dir%\*.*" goto EXIT
if exist "%s_dir%\%p%.lnk" goto EXIT
echo set a = CreateObject("WScript.Shell")>tmp.vbs
echo set b = a.CreateShortcut("%s_dir%\单文件制作.lnk")>>tmp.vbs
echo b.TargetPath ="%cd%\%p%.exe">>tmp.vbs
echo b.WorkingDirectory = "%cd%">>tmp.vbs
echo b.IconLocation = "%cd%\%p%.exe">>tmp.vbs
echo b.Description = "">>tmp.vbs
echo b.Save>>tmp.vbs
wscript tmp.vbs
del tmp.vbs 2>nul
:EXIT
复制代码
作者:
旁观者清
时间:
2022-4-5 17:07
谢谢分享。
作者:
断桥烟雨
时间:
2022-4-26 14:18
我也常把7Z新版打包
作者:
cfq001
时间:
2022-6-7 22:19
感谢分享,收藏了.
作者:
银狼驰骋
时间:
2022-11-6 13:15
支持一下大佬,好用
作者:
dxp_1123
时间:
2022-11-11 17:51
下载中
作者:
a583091790
时间:
2022-11-24 13:01
非常不错,学习了。这个批处理好。
作者:
laonat
时间:
2022-12-1 18:26
谢谢分享
欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/)
Powered by Discuz! X3.3