本帖最后由 yyz219 于 2022-4-17 11:41 编辑
我来一个转换成为不需要修改就能够显示文本的
1.添加右键菜单 .bat- @echo off
- reg add "HKCR\*\shell\修改后缀" /f /v "SubCommands" /t REG_SZ /d ""
- reg add "HKCR\*\shell\修改后缀" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,6"
- reg add "HKCR\*\shell\修改后缀\shell\asm" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\asm" /f /v "MUIVerb" /t REG_SZ /d "asm"
- reg add "HKCR\*\shell\修改后缀\shell\asm\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.asm\""
- reg add "HKCR\*\shell\修改后缀\shell\bat" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\bat" /f /v "MUIVerb" /t REG_SZ /d "bat"
- reg add "HKCR\*\shell\修改后缀\shell\bat\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.bat\""
- reg add "HKCR\*\shell\修改后缀\shell\c" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\c" /f /v "MUIVerb" /t REG_SZ /d "c"
- reg add "HKCR\*\shell\修改后缀\shell\c\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.c\""
- reg add "HKCR\*\shell\修改后缀\shell\cpp" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\cpp" /f /v "MUIVerb" /t REG_SZ /d "cpp"
- reg add "HKCR\*\shell\修改后缀\shell\cpp\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.cpp\""
- reg add "HKCR\*\shell\修改后缀\shell\java" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\java" /f /v "MUIVerb" /t REG_SZ /d "java"
- reg add "HKCR\*\shell\修改后缀\shell\java\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.java\""
- reg add "HKCR\*\shell\修改后缀\shell\js" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\js" /f /v "MUIVerb" /t REG_SZ /d "js"
- reg add "HKCR\*\shell\修改后缀\shell\js\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.js\""
- reg add "HKCR\*\shell\修改后缀\shell\ps1" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\ps1" /f /v "MUIVerb" /t REG_SZ /d "ps1"
- reg add "HKCR\*\shell\修改后缀\shell\ps1\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.ps1\""
- reg add "HKCR\*\shell\修改后缀\shell\txt" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\txt" /f /v "MUIVerb" /t REG_SZ /d "txt"
- reg add "HKCR\*\shell\修改后缀\shell\txt\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.txt\""
- reg add "HKCR\*\shell\修改后缀\shell\vbs" /f /v "Icon" /t REG_EXPAND_SZ /d "C:\Windows\system32\user32.dll,4"
- reg add "HKCR\*\shell\修改后缀\shell\vbs" /f /v "MUIVerb" /t REG_SZ /d "vbs"
- reg add "HKCR\*\shell\修改后缀\shell\vbs\command" /f /ve /t REG_SZ /d "cmd /c for /f \"delims=\" %%%%a in (\"%%1\") do rename \"%%%%a\" \"%%%%~na.vbs\""
- echo 添加成功
- pause&exit
复制代码 2.删除右键菜单.bat- @echo off
- reg delete "HKCR\*\shell\修改后缀" /f >nul 2>nul
- echo 删除成功!
- pause&exit
复制代码
|