该文件没有与之关联的程序来执行操作

发布于 2023-06-25  663 次阅读


有的时候Windows10、Windows11会出现我的电脑以及文件夹打不开的情况

弹窗报错“该文件没有与之关联的程序来执行操作”

可以新建一个记事本文件,复制粘贴以下代码进入记事本文件

taskkill /f /im explorer.exe

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

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

reg add "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /t reg_sz /f

reg add "HEKY_CLASSES_ROOT\piffile" /v IsShortcut /t reg_sz /f

start explorer

保存好之后,把文件后缀txt改为bat,然后鼠标右键点击该文件,选择管理员运行

一般问题就可以直接解决了