时间:2021-09-07 22:51:03来源: www.ghostwin8.com 作者:win7右键,打开方式,记事本 浏览次数:次
有的网友比较喜欢安装win7系统,使用久了会发现win7系统右键选择打开方式中出现两个记事本选项的问题。近日就有大部分用户到本站留言关于win7系统右键选择打开方式中出现两个记事本选项的问题应该怎么处理。尽管处理方法特别的容易,可是也有很多朋友不知道win7系统右键选择打开方式中出现两个记事本选项究竟要怎么处理。你只要按照1、网站查找的方法:首先创建批处理,用来处理这个问题,把里面的代码复制粘贴到文本文件,保存为后缀。bat的文件,执行就可以了。 2、经小编测试,再加上翻阅资料,上述源码有误,应该是:的顺序就可以了,下面就是win7系统右键选择打开方式中出现两个记事本选项的具体操作流程了,不会的朋友赶快学习一下吧!
推荐:
原因分析:
因为在我们系统windows文件夹(C:Windows)和system32文件夹(C:WindowsSystem32)下面各有一个notepad.exe程序,系统在注册应用程序和文件关联打开方式的时候,分别使用了它们,但是打开方式又要读取这两个地方,所以就出现两个记事本了。
解决方法:
1、网站查找的方法:首先创建批处理,用来处理这个问题,把里面的代码复制粘贴到文本文件,保存为后缀。bat的文件,执行就可以了。
[email protected] off
if exist “%systemroot%
otepad.exe” set Npath=“%systemroot%
otepad.exe %%”1
if not exist “%systemroot%
otepad.exe” set Npath=“%systemroot%system32
otepad.exe %%”1
reg add “HKCR xtfileshellopencommand” /ve /d %Npath% /t REG_SZ /f
reg add “HKCRApplications
otepad.exeshellopencommand” /ve /d %Npath% /t REG_SZ /f
reg add “HKCRSystemFileAssociations extshellopencommand” /ve /d %Npath% /t REG_SZ /f
2、经小编测试,再加上翻阅资料,上述源码有误,应该是:
[email protected] off
if exist “%systemroot%
otepad.exe” set Npath=“%systemroot%
otepad.exe %”1
if not exist “%systemroot%
otepad.exe” set Npath=“%systemroot%system32
otepad.exe %”1
reg add “HKCR xtfileshellopencommand” /ve /d %Npath% /t REG_SZ /f
reg add “HKCRApplications
otepad.exeshellopencommand” /ve /d %Npath% /t REG_SZ /f
reg add “HKCRSystemFileAssociations extshellopencommand” /ve /d %Npath% /t REG_SZ /f
3、然后就可以解决win7系统右键选择打开方式中出现两个记事本选项了。
命令简单介绍:
if exist "%systemroot% otepad.exe" set Npath="%systemroot% otepad.exe %"1
这句话是设置一个变量: Npath="%systemroot% otepad.exe %"1,这个变量将写入注册表。
%1 表示参数
比如你想打开1.txt,就是用 命令:notepad 1.txt搞定。
这个方法算是解决了txt后缀文件打开方式出现两个文件夹具体的设置方法:
总结:
我们在设置txt后缀打开类型的时候,
设置了HKEY_CLASSES_ROOTSystemFileAssociations extshellopencommand=%systemroot% otepad.exe
这就导致text类型直接映射到c:Windows otepad.exe
这时候包括ini文件inf文件在内的所有PerceivedType=text的文件类型映射到了c:Windows otepad.exe。
ini,inf文件的打开类型已经映射到了c:WindowsSystem32 otepad.exe
这时候就会右键打开---出现两个记事本选项。。
解决的根本之道就是,将HKEY_CLASSES_ROOTSystemFileAssociations extshellopencommand=%systemroot%System32 otepad.exe
请使用命令:
@echo off
set Npath="%systemroot%system32 otepad.exe %"1
reg add "HKCR xtfileshellopencommand" /ve /d %Npath% /t REG_SZ /f
reg add "HKCRApplications otepad.exeshellopencommand" /ve /d %Npath% /t REG_SZ /f
reg add "HKCRSystemFileAssociations extshellopencommand" /ve /d %Npath% /t REG_SZ /f
最后我们看看所谓的ini文件:
本篇关于win7系统右键选择打开方式中出现两个记事本选项的解决方法到这里已经讲解完了,还有不知道怎么解决的小伙伴赶快来学习一下吧!相信这篇文章一定可以帮到大家!
Copyright @ 2021 xp系统下载官网 ghostwin8.com 版权所有
本站发布的系统与软件都由网友上传仅为个人学习测试使用,不得用于任何商业用途,否则后果自负,请支持购买微软正版软件!
如有侵犯您的版权,请联系我们会第一时间处理!