Home >Computer Tutorials >Computer Knowledge >Why does the New Notepad option disappear after right-clicking on the computer?
Open notepad, save the following content as 1.bat, open and run
@echo off
title �te%
mode con: cols=70 lines=20
:start
CLS
echo On the desktop or in a folder, there is a new item in the New (W) option in the right-click menu of the blank space.
echo This batch can add or delete&echo.&echo.&echo.&echo.&echo.&echo.
echo 1.Add 2.Delete
echo.
echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
set /p a= Enter 1 or 2^=
IF %A%==1 GOTO 1
IF %A%==2 GOTO 2
GOTO start
:1
title Add right-click to create a new item
cls
echo.&echo.&echo.&echo.
echo Notepad (txt), Excel (xls), presentation (ppt), word (doc)
echo.
echo.
set /p a1=Please enter the format, such as txt vbs bat^=
reg add HKCR\.�%\ShellNew /v nullfile /f >nul 2>nul
echo operation successful
PAUSE>nul &GOTO START
:2
title Delete right-click to create new item
cls
echo.&echo.&echo.&echo.
echo Notepad (txt), Excel (xls), presentation (ppt), word (doc)
echo.&echo.
set /p a=Please enter the format, such as txt vbs bat^=
reg delete "HKCR\.%a%\ShellNew" /v nullfile /f >nul 2>nul
echo operation successful
PAUSE>nul &GOTO START
Save the following code as "TXT.reg" (without quotation marks) in Notepad and then import it for registration.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.txt]
@="txtfile"
"Content Type"="text/plain"
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"NullFile"="""
[HKEY_CLASSES_ROOT\txtfile]
@="Text document"
[HKEY_CLASSES_ROOT\txtfile\shell]
[HKEY_CLASSES_ROOT\txtfile\shell\open]
[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="NOTEPAD.EXE %1"
There is also a software method. Download a software called "Rat Cow" and enter ".txt" (without quotation marks) in the extension. Then click Add to add.
The above is the detailed content of Why does the New Notepad option disappear after right-clicking on the computer?. For more information, please follow other related articles on the PHP Chinese website!