更新日期:2019-11-15 作者:雨木风林U盘启动 来源:http://www.cr.cc
很多朋友安装win10系统后,在使用的过程中会遇到win10系统右键”打开方式“中有两个相同记事本选项的情况,可能有很多用户还是不能自己处理win10系统右键”打开方式“中有两个相同记事本选项的问题,其实简单的来说处理win10系统右键”打开方式“中有两个相同记事本选项的问题只需要按照 、首先创建批处理,用来处理这个问题,把里面的代码复制粘贴到文本文件,保存为后缀.bat的文件,执行就可以了。就可以轻松的解决了;如果还有不能自己处理win10系统右键”打开方式“中有两个相同记事本选项问题的朋友,就跟随小编的脚步一起来学习一下吧。
原因分析:
因为在我们系统windows文件夹(C:windows)和system32文件夹(C:windowssystem32)下面各有一个 notepad.exe程序,系统在注册应用程序和文件关联打开方式的时候,分别使用了它们,但是打开方式又要读取这两个地方,所以就出现两个记事本了。
解决方法:
1、首先创建批处理,用来处理这个问题,把里面的代码复制粘贴到文本文件,保存为后缀.bat的文件,执行就可以了。
@echo off
if exist “%systemroot%notepad.exe” set npath=“%systemroot%notepad.exe %”1
if not exist “%systemroot%notepad.exe” set npath=“%systemroot%system32notepad.exe %”1
reg add “HKCRtxtfileshellopencommand” /ve /d %npath% /t REG_sZ /f
reg add “HKCRApplicationsnotepad.exeshellopencommand” /ve /d %npath% /t REG_sZ /f
reg add “HKCRsystemFileAssociationstextshellopencommand” /ve /d %npath% /t REG_sZ /f
2、然后就可以解决右键选择打开方式中出现两个记事本选项了。
命令简单介绍:
if exist “%systemroot%notepad.exe” set npath=“%systemroot%notepad.exe %”1
这句话是设置一个变量: npath=“%systemroot%notepad.exe %”1,这个变量将写入注册表。
%1 表示参数
比如你想打开1.txt,就是用 命令:notepad 1.txt搞定。
这个方法算是解决了txt后缀文件打开方式出现两个文件夹进行设置的朋友,就跟随小编的脚步一起来学习一下吧。
总结:
我们在设置txt后缀打开类型的时候,
设置了HKEY_CLAssEs_RooTsystemFileAssociationstextshellopencommand=%systemroot%notepad.exe
这就导致text类型直接映射到c:windowsnotepad.exe
这时候包括ini文件inf文件在内的所有perceivedType=text的文件类型映射到了c:windowsnotepad.exe。
ini,inf文件的打开类型已经映射到了c:windowssystem32notepad.exe
这时候就会右键打开---出现两个记事本选项。。
解决的根本之道就是,将HKEY_CLAssEs_RooTsystemFileAssociationstextshellopencommand=%systemroot%system32notepad.exe
请使用命令:
@echo off
set npath=“%systemroot%system32notepad.exe %”1
reg add “HKCRtxtfileshellopencommand” /ve /d %npath% /t REG_sZ /f
reg add “HKCRApplicationsnotepad.exeshellopencommand” /ve /d %npath% /t REG_sZ /f
reg add “HKCRsystemFileAssociationstextshellopencommand” /ve /d %npath% /t REG_sZ /f
最后我们看看所谓的ini文件:
更新时间:2019-05-24
更新时间:2019-11-09
更新时间:2019-09-24