up vote 22 down vote favorite
9
share [g+] share [fb]

I use notepad2. I love notepad2.

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

link|improve this question

How did you did it the last time? – Oscar Reyes 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? – Oscar Reyes 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
Or maybe I'm confusing this with something totally unrelated. But, anyway, open explorer as administrator before overwriting is no longer "simply overwrite". – R. Martinho Fernandes Jul 15 '09 at 10:51
show 1 more comment
feedback

protected by Diago Oct 16 '10 at 19:26

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

7 Answers

up vote 27 down vote accepted

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

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

As mentioned by Even, and updated guide is available here

link|improve this answer
1  
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
feedback

Oh, why, of course: Notepad Replacer.

link|improve this answer
8  
This should be the accepted answer. – endolith Jan 2 '11 at 19:43
feedback

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.

link|improve this answer
feedback

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
link|improve this answer
feedback

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

link|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). – musicfreak 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
feedback

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

link|improve this answer
feedback

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
link|improve this answer
feedback

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