Tag Archive for 'Notepad2'

Justyn is sitting at work. :-( 2 weeks ago

Replace Notepad with Notepad2, Vista

One of my previous posts was about the text editor Notepad2. Which as I mentioned before is a lightweight editor which also has syntax highlighting.

Now I recently noticed a forum post on MSFN, on how to replace Notepad with Notepad2, so without further ado, here is the code:

takeown /f %Systemroot%\notepad.exe
takeown /f %Systemroot%\System32\notepad.exe
icacls %Systemroot%\notepad.exe /grant “%username%”:f
icacls %Systemroot%\System32\notepad.exe /grant “%username%”:f
IF EXIST %SYSTEMROOT%\SysWOW64 (bcdedit.exe -set loadoptions “DDISABLE_INTEGRITY_CHECKS”)
copy %Systemroot%\notepad.exe %Systemroot%\notepad.original.exe
copy %Systemroot%\System32\notepad.exe %Systemroot%\System32\notepad.original.exe
ECHO.
ECHO Original notepad.exe has been renamed to “notepad.original.exe” in its original folder.
ECHO.
copy notepad2\notepad2.exe %Systemroot%\notepad.exe /y
copy notepad2\notepad2.exe %Systemroot%\System32\notepad.exe /y

Now all you need to do is save this into a bat file, I called mine replacenp2.bat. Then just create a folder called notepad2, with a subfolder the same, and place the notepad2.exe file in it, and run the command, and voiola, Notepad is replaced with Notepad2.

So the directory structure should look something like this:

  • notepad2
  • replacenp2.bat
    • notepad2
      • notepad2.exe

Update: Now, I tried running the command, but for some reason (even ran as admin), it didn’t want to copy it. So I opened up an elevated command prompt, and it seemed to copy & replace fine.

Notepad2 editor

I generally do all my HTML/PHP/CSS editing in Notepad, and one fallback with the Notepad that comes with windows is syntax highlighting. I found this neat little program called Notepad2, which is lightweight, doesn’t require any installation, and doesn’t change anything in the registry which is a bonus!

The installation file weighs in at 247KB, a small amount of data for such a feature-rich notepad. Another bonus is you can also replace the default Notepad that comes with windows with Notepad2, which you can view howto’s for Windows XP and Windows Vista.

I highly recommend checking out the Notepad2 website, or downloading Notepad2 (v2.1.19 at time of writing), you wont be disappointed with it.




Bad Behavior has blocked 163 access attempts in the last 7 days.