右键“打开方式”中会出现两个“记事本”

 时间:2024-10-12 00:32:29

1、出现两个记事本的原因如下:因为在我们系统WINDOWS文件夹和SYSTEM32文件夹下面各有一个notepad.exe程序,系统在注册应用程序和文件关联打开方式的时候,分别使用了它们,但是打开方式又要读取这两个地方,这就出来两个记事本了。

2、解决方法:新建一个批处理文件(.bat文件)保存为解决右键打开方式中出现双记事本.bat即可。

3、代码如下:

@echo off

if exist "%systemroot%\notepad.exe" set Npath="%systemroot%\notepad.exe %%"1

if not exist "%systemroot%\notepad.exe" set Npath="%systemroot%\system32\notepad.exe %%"1

reg add "HKCR\txtfile\shell\open\command" /ve /d %Npath% /t REG_SZ /f

reg add "HKCR\Applications\notepad.exe\shell\open\command" /ve /d %Npath% /t REG_SZ /f

reg add "HKCR\SystemFileAssociations\text\shell\open\command" /ve /d %Npath% /t REG_SZ /f

热门搜索
蛇肉好吃吗 机械表走的快怎么办 葡萄干怎么洗 绿豆芽怎么做好吃 怎么样接吻 云顶之奕怎么玩 卵巢多囊怎么治疗 肉丸子的家常做法 水煮肉片的家常做法 鸭汤怎么做好吃