这里的问题不是文件关联,除非您想将记事本关联为要打开的默认程序所有HTML文件(而不是Web浏览器)。
我推荐这种方法代替:
1. 输入程序的可执行文件名称(notepad.exe),作为这两个注册表项的子项,如下所示:
[HKEY_CLASSES_ROOT\.htm\OpenWithList\notepad.exe]
[HKEY_CLASSES_ROOT\.html\OpenWithList\notepad.exe]
2. 并在此处添加“ edit”子项:
[HKEY_CLASSES_ROOT\Applications\notepad.exe]
[HKEY_CLASSES_ROOT\Applications\notepad.exe\shell]
[HKEY_CLASSES_ROOT\Applications\notepad.exe\shell\edit]
[HKEY_CLASSES_ROOT\Applications\notepad.exe\shell\edit\command]
Default = C:\WINDOWS\notepad.exe "%1"
3. 要更改默认编辑器,请使用首选编辑器的命令行替换此注册表项中的“ Default”条目:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor]
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor\shell]
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor\shell\edit]
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor\shell\edit\command]
Default = C:\WINDOWS\notepad.exe "%1"