打开方式-选择其他应用-该文件没有与之关联的应用来执行该操作。请安装应用,若已经安装应用,请在“默认应用设置”页面中创建关联

本文最后更新于:6 小时前

久违添加个index图

打开方式-选择其他应用-该文件没有与之关联的应用来执行该操作。请安装应用,若已经安装应用,请在“默认应用设置”页面中创建关联。

问题

鼠标右键点击任何文件打开方式-选择其他应用报错该文件没有与之关联的应用来执行该操作。请安装应用,若已经安装应用,请在“默认应用设置”页面中创建关联。

error

解决

在csdn上找的,没想到啊。解决方案

修改注册表有风险,最好先备份,并清楚自己在做什么,如果不知道下面什么意思就去问chatgpt。

把下面两段分别写到txt文件中,然后把后缀改为reg。运行。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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}"

解释:Windows Registry Editor Version 5.00不用说,都是英语。

HKEY_CLASSES_ROOT\Unknown\shell\openas注册表位置,@表示默认字符串值,hex(2) 表示表示这是一个 Unicode 字符串类型的值。后面的是十六位字符串,比如第二串翻译成ASCII码就是%SystemRoot%\system32\OpenWith.exe "%1",这是执行文件的路径和其参数。

MultiSelectModel:一个字符串值,将右键菜单中“打开方式”选项的多选模式设置为“Single”,表示只能选中一个文件进行操作。

DelegateExecute 是 Windows 注册表中一个用于文件关联的键名(键值)。当该键存在时,它会指定一个 CLSID(类标识符),该 CLSID 的值将会被用于执行与该文件关联的操作,而不是使用默认程序。

改后注册表的长相

下面的注册表文件也类似

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Windows Registry Editor Version 5.00

[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}"


虽然我不懂注册表文件,不过上面两个应该可以合并为一个

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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}"

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!