Home » Questions » Computers [ Ask a new question ]

How do I replace Notepad in Windows 7? [duplicate]

How do I replace Notepad in Windows 7? [duplicate]

I use Notepad2. I love Notepad2.

Asked by: Guest | Views: 122
Total answers/comments: 4
Guest [Entry]

Oh, why, of course: Notepad Replacer.
Guest [Entry]

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.
Guest [Entry]

"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 © 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"
"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 © 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"
Guest [Entry]

"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"