内容 |
 原因分析: 因为在我们系统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 |