|
很多朋友會(huì)發(fā)現(xiàn)在右鍵菜單中會(huì)出現(xiàn)兩個(gè) “記事本”的情況,有些膽子小的朋友以為中毒了,呵呵。 其實(shí)這也是很正常的一件事,因?yàn)樵谖覀兿到y(tǒng)WINDOWS文件夾和SYSTEM32文件夾下面各有一個(gè)notepad.exe程序,系統(tǒng)在注冊(cè)應(yīng)用程序和文件關(guān)聯(lián)打開方式的時(shí)候,分別使用了它們,但是打開方式又要讀取這兩個(gè)地方,這就出來兩個(gè)記事本了,呵呵,我這么一說朋友們應(yīng)該就明白是什么回事了! 我做了一個(gè)批處理,用來處理這個(gè)問題,把西面的代碼復(fù)制粘貼到文本文件,保存為后綴BAT的文件,執(zhí)行就可以了。 轉(zhuǎn)貼請(qǐng)注明出處! rem 解決打開方式中出現(xiàn)雙記事本的問題 --- 佛愛我羊 @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
|
|
|