桌酷主题w7系统右键”打开方式“中有两个相同记事本选项的修复步骤
- 发布日期:2012-02-09 作者:win7主题之家 来源:http://www.chenhai.cc
桌酷主题w7家庭版开机速度快,是入门级桌酷主题w7系统。据调查不少用户在使用中都碰到了桌酷主题w7系统右键”打开方式“中有两个相同记事本选项的问题。面对桌酷主题w7系统右键”打开方式“中有两个相同记事本选项这样的小问题,我们该如何解决呢?不经常使用电脑的朋友对于桌酷主题w7系统右键”打开方式“中有两个相同记事本选项的问题可能会无从下手。但对于电脑专业人员来说解决办法就很简单了: 、首先创建批处理,用来处理这个问题,把里面的代码复制粘贴到文本文件,保存为后缀.bat的文件,执行就可以了。看了这些简单操作,你是不是已经掌握了桌酷主题w7系统的一些使用技巧了呢?如果还有什么不明白的地方,那就请继续学习下面分享给大家的关于桌酷主题w7系统右键”打开方式“中有两个相同记事本选项的问题的具体步骤方法吧。
原因分析:
因为在我们系统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文件: