wenbieba 发表于 2023-1-30 19:44:49

批处理(注册表)问题

本帖最后由 wenbieba 于 2023-1-30 19:50 编辑

依照此贴
原版Win10-LTSC2021极简Dism离线封装教程————自己动手丰衣足食 - 综合讨论区 - 无忧启动论坛 - Powered by Discuz! (wuyou.net)中的批处理优化设置,在原基础上从5项桌面右键菜单增加到12项。但是在增加10项的时候一切正常,到12项时从reg add "HKCR\DesktopBackground\shell\Item0\shell\Item13" /f /v "CommandFlags" /t REG_DWORD /d 15    之下只能显示一个剩余"编辑 Hosts"与"刷新DNS缓存"无论如何修改Item13" /f /v "CommandFlags" /t REG_DWORD /d 15中的13与15,都不起作用,貌似与/d 15最高有关系,但只能到15,恳求大神指点,附上原脚本;
::--------添加鼠标右键工具--------
::在桌面背景上添加:常用设置右键菜单
reg add "HKCR\DesktopBackground\shell\Item0" /f /v "MUIVerb" /t REG_SZ /d "常用设置"
reg add "HKCR\DesktopBackground\shell\Item0" /f /v "SubCommands" /t REG_SZ /d ""
reg add "HKCR\DesktopBackground\shell\Item0" /f /v "Icon" /t REG_SZ /d "imageres.dll,226"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item0" /f /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-4161"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item0" /f /v "Icon" /t REG_SZ /d "imageres.dll,-27"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item0\Command" /f /ve /t REG_SZ /d "control.exe"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item1" /f /v "MUIVerb" /t REG_SZ /d "注册表"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item1" /f /v "Icon" /t REG_SZ /d "regedit.exe,0"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item1\Command" /f /ve /t REG_SZ /d "regedit -m"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item2" /f /v "MUIVerb" /t REG_SZ /d "服务"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item2" /f /v "HasLUAShield" /t REG_SZ /d ""
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item2" /f /v "Icon" /t REG_SZ /d "C:\Windows\System32\filemgmt.dll,0"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item2\command" /f /ve /t REG_SZ /d "mmc.exe services.msc"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item3" /f /v "MUIVerb" /t REG_SZ /d "本地组策略"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item3" /f /v "Icon" /t REG_SZ /d "C:\Windows\System32\mmc.exe,1"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item3\command" /f /ve /t REG_SZ /d "mmc.exe gpedit.msc"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item4" /f /v "MUIVerb" /t REG_SZ /d "任务计划"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item4" /f /v "Icon" /t REG_SZ /d "%%SystemRoot%%\System32\shell32.dll,239"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item4\command" /f /ve /t REG_SZ /d "mmc.exe taskschd.msc"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item5" /f /v "MUIVerb" /t REG_SZ /d "防火墙规则"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item5" /f /v "Icon" /t REG_SZ /d "%%SystemRoot%%\System32\shell32.dll,135"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item5\command" /f /ve /t REG_SZ /d "mmc.exe WF.msc"
reg add "HKCR\DesktopBackground\shell\Item0\shell\Item6" /f /v "CommandFlags" /t REG_DWORD /d 8
。。。。
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenControlPanel" /f /v "MUIVerb" /t REG_SZ /d "用户账户控制"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenControlPanel" /f /v "HasLUAShield" /t REG_SZ /d ""
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenControlPanel\command" /f /ve /t REG_SZ /d "UserAccountControlSettings.exe"

修改Item6=13,REG_DWORD /d 8=15时,以下右键不显示,但注册表中有项

reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit" /f /v "MUIVerb" /t REG_SZ /d "编辑 Hosts"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit" /f /v "Icon" /t REG_SZ /d "C:\Windows\System32\mshta.exe,0"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit\command" /f /ve /t REG_SZ /d "mshta vbscript:createobject(\"shell.application\").shellexecute(\"notepad.exe\",\"C:\Windows\system32\drivers\etc\hosts\",\"\",\"runas\",1)(close)"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit0" /f /v "MUIVerb" /t REG_SZ /d "刷新DNS缓存"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit0" /f /v "Icon" /t REG_SZ /d "%%SystemRoot%%\System32\shell32.dll,238"
reg add "HKCR\DesktopBackground\shell\Item0\shell\OpenMoreRegedit0\command" /f /ve /t REG_SZ /d "ipconfig /flushdns"

yyz2191958 发表于 2023-1-30 20:09:01

谢谢分享

fulibo 发表于 2023-1-30 20:09:42

据说右键菜单设置多了会出毛病!
不知道是不是真的???

wenbieba 发表于 2023-1-30 20:14:13

fulibo 发表于 2023-1-30 20:09
据说右键菜单设置多了会出毛病!
不知道是不是真的???

帮看看

yc2428 发表于 2023-1-30 20:28:24

谢谢分享!

cpa 发表于 2023-1-30 20:50:49

赞一个

nowayer 发表于 2023-12-9 07:19:44

hehuiying 发表于 2024-4-22 13:44:52

谢谢分享

hehuiying 发表于 2024-4-22 13:45:09

谢谢分享
页: [1]
查看完整版本: 批处理(注册表)问题