Auto Install Script for Notepad2 in Vista to Replace Notepad
For Notepad2 lovers who want to use Notepad2 in Windows Vista as Notepad replacement to completely replace the default classic yet not much functionality Notepad, they can follow this hack. However, if you do not want to do the steps manually, here’s a auto installation script for Notepad2 in Windows Vista, which will install Notepad2 and configure it to replace Notepad.exe as the default text editor.
How to use the auto install script for Notepad2 in Vista:
- Create (InstallNotepad2.bat) with the content followed by.
- Download the Notepad2, and extract the executable (notepad2.exe) to the same folder as above. Note that both Notepad2.exe and InstallNotepad2.bat batch script must be in the same location that the (InstallNotepad2.bat) be placed.
- Run the InstallNotepad2.bat to automatically replace Notepad as default text editor.
@echo off TITLE Notepad2 Install Script for Complete Vista Notepad Replacement echo. echo Notepad2 Install Script for Complete Vista Notepad Replacement echo Version 1.0 echo. echo (c) My Digital Life (www.mydigitallife.info) echo. echo. echo. echo.echo Confirm to apply? (Press Ctrl-C and answer Y to terminate) pause echo. echo. 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.exe %Systemroot%\notepad.exe /y copy 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
Note that original notepad.exe in \Windows and \Windows\System32 directories have been backup to notepad.original.exe. So to restore to Notepad instead of continue using Notepad2, simply rename back the notepad.original.exe to notepad.exe, replacing any existing notepad.exe.