530 字
3 分钟Add commentMore actions
处理“该文件没有与之关联的应用来执行该操作”

前言#

通过图形界面右键点击文件,选择打开方式 -> 选择其他应用 时,系统提示 “该文件没有与之关联的应用来执行该操作。请安装应用,若已经安装应用,请在”默认应用设置”页面中创建关联。” alt text

这里给出一些解决方案

IMPORTANT

对电脑进行任何处理前请先尝试以下两段指令后再做后续操作

Terminal window
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth

键值缺失异常#

在Powershell中运行:

Terminal window
Start-Process rundll32.exe -ArgumentList "shell32.dll,OpenAs_RunDLL <文件路径>"

如果正常唤醒则说明由于注册表中 HKEY_CLASSES_ROOT\Unknown\shell 分支的键值缺失或损坏导致系统无法正常调用“打开方式”对话框

修复注册表中缺失的 OpenAsOpenWithSetDefaultOn 键值,恢复系统默认的“打开方式”功能

创建.reg注册表文件:

Restore_OpenWith.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Unknown\shell\openas]
@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,\
68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,35,\
00,33,00,37,00,36,00,00,00
"MultiSelectModel"="Single"
[HKEY_CLASSES_ROOT\Unknown\shell\openas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4f,00,70,00,\
65,00,6e,00,57,00,69,00,74,00,68,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,31,00,22,00,00,00
"DelegateExecute"="{e44e9428-bdbc-4987-a099-40dc8fd255e7}"
[HKEY_CLASSES_ROOT\Unknown\shell\OpenWithSetDefaultOn]
"MultiSelectModel"="Single"
"ProgrammaticAccessOnly"=""
[HKEY_CLASSES_ROOT\Unknown\shell\OpenWithSetDefaultOn\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4f,00,70,00,\
65,00,6e,00,57,00,69,00,74,00,68,00,2e,00,65,00,78,00,65,00,20,00,2d,00,6f,\
00,76,00,65,00,72,00,72,00,69,00,64,00,65,00,20,00,22,00,25,00,31,00,22,00,\
00,00
"DelegateExecute"="{e44e9428-bdbc-4987-a099-40dc8fd255e7}"

去除快捷方式图标的小箭头后异常#

创建 .bat 文件后执行即可正确修改快捷方式图标下的小箭头

Restore_Lnkfile.bat
@echo off
:: 批处理文件用于修改Windows快捷方式
:: 注意:需要管理员权限运行
:: 检查是否以管理员身份运行
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo 请使用管理员身份运行此脚本
pause
exit /b
)
:: 关闭Windows资源管理器
taskkill /f /im explorer.exe >nul 2>&1
:: 修改注册表项 - 系统图标设置
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "C:\Windows\system32\imageres.dll,154" /t reg_sz /f >nul
:: 修改注册表项 - 用户图标设置
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "C:\Windows\system32\imageres.dll,154" /t reg_sz /f >nul
:: 移除快捷方式箭头 - lnk文件
reg add "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /t reg_sz /f >nul
:: 移除快捷方式箭头 - pif文件
reg add "HKEY_CLASSES_ROOT\piffile" /v IsShortcut /t reg_sz /f >nul
:: 重启资源管理器
start explorer.exe >nul
echo 快捷方式已成功修改!
echo 可能需要注销或重启使更改完全生效
pause

win+E 唤出explorer.exe异常#

创建注册表执行即可:

Repair_explorer.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
@=""
[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
“DelegateExecute”="{11dbb47c-a525-400b-9e80-a54615a090c0}"
处理“该文件没有与之关联的应用来执行该操作”
https://p1ume.vercel.app/posts/case/norelation/
作者
p1ume
发布于
2025-06-24
许可协议
CC BY-NC-SA 4.0