I use Notepad2. I love Notepad2.

How do I replace Notepad with Notepad2 in Windows 7, so I never use the old version of Notepad again?

  • How did you did it the last time?
    – OscarRyz
    Commented Jul 15, 2009 at 10:27
  • 1
    His problem is that you no longer can simply overwrite notepad.exe, which I suppose was the "old" installation method. Commented Jul 15, 2009 at 10:31
  • : - O Wouldn't 't open explorer as administrator do the trick?
    – OscarRyz
    Commented Jul 15, 2009 at 10:32
  • I can't be 100% sure but last time I checked only TrustedInstaller or something has write access to that folder. Commented Jul 15, 2009 at 10:48
  • 1
    If you start launching notepad2 instead of notepad and also associate any file types you want to open in notepad2 with it - there shouldn't be a need to replace it? It's not like using Chrome or Firefox by default instead of IE requires us to overwrite iexplore.exe... Commented Sep 3, 2009 at 14:31

7 Answers 7


Oh, why, of course: Notepad Replacer.

  • 19
    This should be the accepted answer.
    – endolith
    Commented Jan 2, 2011 at 19:43
  • Agreed - this took seconds to perform and did not require me to make any additional changes. Existing shortcuts, send to menus, and shortcut keys just work.
    – Dean
    Commented Sep 20, 2012 at 16:41

Use the Notepad2 Modifications installer. It works on 32 bit and 64 bit.

This Notepad++ wiki page also has a step-by-step guide for Windows XP and Windows Vista which also works on Windows 7.

  • 2
    I couldn't get the Notepad++ instructions to work on my newly installed Win 7 (x64) system. No doubt me doing something wrong though.
    – Martin
    Commented Sep 3, 2009 at 13:45
  • Finally... a site recommends the proper (IMO) way to replace it.
    – ijprest
    Commented Dec 17, 2009 at 18:45
  • 2
    Updated link: sourceforge.net/apps/mediawiki/notepad-plus/…
    – Even Mien
    Commented Nov 23, 2010 at 13:14
  • That page just has a huge list of ways to replace with Notepad++. Which one actually works in Windows 7 64-bit?
    – endolith
    Commented Jan 2, 2011 at 18:56
  • Just use the super-easy solution that Mircea Chirea mentions: Notepad Replacer (see his answer). One installer to do this automatically. You can pick any replacemant editor. Uninstall it, and all changes are reverted. It's the perfect solution. Commented Dec 19, 2013 at 14:29

If you want to make sure you are using Notepad2, go to a file that you would typically use Notepad2 for and right click > properties. Then where it says "opens with", select change and select Notepad2.


As of this post's date, the recommended approach to replace Notepad with Notepad2 on Windows 7 is best described here.

  • ...and now as of Notepad2 version 4.2.25, the Notepad2 Setup Tool takes care of it automatically :) Commented Jun 13, 2012 at 20:40

Rename notepad.exe to oldpad.exe and a copy or symbolic link of your replacement to notepad.exe

  • 4
    I'd be surprised if you can simply rename a system-supplied executable without problems or weirdness afterwards.
    – Joey
    Commented Jul 16, 2009 at 5:46
  • @Johannes: You can, but it takes a lot of command-line hackery, especially on Vista (it's a lot easier on XP). Commented Jul 22, 2009 at 6:07
  • I renamed notepad.exe with but an elevated explorer. I couldn't delete uxtheme either, but I could rename it easily.
    – Phoshi
    Commented Sep 3, 2009 at 13:54
  • On XP, System File Protection takes a few seconds to kick in. So if you're quick, you can replace both notepad.exe's by hand in explorer, and then click "ignore changes" or something to that effect
    – zildjohn01
    Commented Dec 3, 2009 at 21:07

Just thought I'd throw one into the mix. It's based on the original notepad2 installer script which worked well in Vista. I found it on this forum post.

@echo off
TITLE Notepad2 Install Script for Complete Windows Vista and 7 Notepad Replacement
echo Notepad2 Install Script for Complete Windows Vista and 7 Notepad Replacement
echo Version 1.2
echo (c) My Digital Life (www.mydigitallife.info)
echo Confirm to apply? (Press Ctrl-C and answer Y to terminate)

if exist %Systemroot%\notepad.original.exe goto exist_notepad2_already
if exist %Systemroot%\System32\notepad.original.exe goto exist_notepad2_already
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 Original notepad.exe has been renamed to "notepad.original.exe" in its original folder.
copy %~dp0\notepad2.exe %Systemroot%\notepad.exe /y
copy %~dp0\notepad2.exe %systemroot%\System32\notepad.exe /y
echo Notepad2 installation is completed. 
echo If no error occurred, Notepad2 will now replace all Notepad functions.

  • This simply overwrites Windows's notepad executable. There's a reason this script has to alter default privileges and disable integrity checks: it'll harm the integrity of your system. Notepad.exe may not be crucial and the script does make backups, but I would very much recommend one of the cleaner and safer procedures suggested instead. Commented Jun 14, 2012 at 10:01

In Windows XP, I used this script from this website to get it to work. You need to perform these registry functions first and place the .vbs script into your C:\Program Files\notepad++ directory,

'// 1)
'// Navigate to registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\
'// 2)
'// Add new subkey with the name of the executable you want replaced (no path) e.g. notepad.exe
'//     This step is what tells windows to use the replacement exe, to undo simply delete the key you created
'// 3)
'// Create new Sting Value called Debugger
'// 4)
'// Modify value and enter wscript.exe "path to this vbs" e.g. wscript.exe "C:\Program Files\notepad++\npp.vbs"

Here is the VBScript:

Option Explicit

'// Declare variables
Dim x        ' old bad habit, I use this for general temporary variables
Dim W        ' This will be the WSHShell object
Dim sCmd    ' This will be the command to run

'// Create WSHShell object
Set W = CreateObject("WScript.Shell")

'// Set the working directory to the one this script resides in
'// If the target program doesn't care where it is run from then you don't need the following line
W.CurrentDirectory = LeftB(WScript.ScriptFullName, LenB(WScript.ScriptFullName) - LenB(WScript.ScriptName))

'// Set the target executable
sCmd = "notepad++.exe"

'// Skip the first argument but grab all the rest
If WScript.Arguments.Count > 1 Then
    For x = 1 To WScript.Arguments.Count - 1
        '// If the argument contains a space then enclose it with ""
        If InStrB(WScript.Arguments(x), " ") Then
            sCmd = sCmd & " """ & WScript.Arguments(x) & """"
            sCmd = sCmd & " " & WScript.Arguments(x)
        End If
End If

'// Run the command
'// The number after the command determines how the window should be initially (google WSHShell.Run)
'// The boolean at the end determines whether this script should run the target then exit or wait until the target exits
W.Run sCmd, 1, False

Not the answer you're looking for? Browse other questions tagged .