Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use notepad2. I love notepad2.

How do I replace notepad2 in windows 7, so I never use the old version of notepad again?

share|improve this question
    
How did you did it the last time? –  OscarRyz Jul 15 '09 at 10:27
1  
His problem is that you no longer can simply overwrite notepad.exe, which I suppose was the "old" installation method. –  R. Martinho Fernandes Jul 15 '09 at 10:31
    
: - O Wouldn't 't open explorer as administrator do the trick? –  OscarRyz Jul 15 '09 at 10:32
    
I can't be 100% sure but last time I checked only TrustedInstaller or something has write access to that folder. –  R. Martinho Fernandes Jul 15 '09 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... –  Oskar Duveborn Sep 3 '09 at 14:31

7 Answers 7

up vote 30 down vote accepted

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

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

Thanks to Evan for pointing out the new Url for the guide

share|improve this answer
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 Sep 3 '09 at 13:45
    
Finally... a site recommends the proper (IMO) way to replace it. –  ijprest Dec 17 '09 at 18:45
2  
Updated link: sourceforge.net/apps/mediawiki/notepad-plus/… –  Even Mien Nov 23 '10 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 Jan 2 '11 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. –  Felix Alcala Dec 19 '13 at 14:29

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

share|improve this answer
4  
I'd be surprised if you can simply rename a system-supplied executable without problems or weirdness afterwards. –  Joey Jul 16 '09 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). –  Sasha Chedygov Jul 22 '09 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 Sep 3 '09 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 Dec 3 '09 at 21:07

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.

share|improve this answer

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.
echo Notepad2 Install Script for Complete Windows Vista and 7 Notepad Replacement
echo Version 1.2
echo.
echo (c) My Digital Life (www.mydigitallife.info)
echo.
echo.
echo.
echo Confirm to apply? (Press Ctrl-C and answer Y to terminate)
pause
echo.
echo.

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

:exist_notepad2_already
echo.
echo INSTALLED NOTEPAD2  ALREADY!.
echo.
pause
exit
share|improve this answer
    
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. –  Marcks Thomas Jun 14 '12 at 10:01

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

share|improve this answer
    
...and now as of Notepad2 version 4.2.25, the Notepad2 Setup Tool takes care of it automatically :) –  matt wilkie Jun 13 '12 at 20:40

Oh, why, of course: Notepad Replacer.

share|improve this answer
16  
This should be the accepted answer. –  endolith Jan 2 '11 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 Sep 20 '12 at 16:41

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,

'// USAGE
'// 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) & """"
        Else
            sCmd = sCmd & " " & WScript.Arguments(x)
        End If
    Next
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
share|improve this answer

protected by Diago Oct 16 '10 at 19:26

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.