Skip to main content

How to install Notepad2 and replace Windows Notepad

Update: The Setup installer of the latest Notepad2 will automatically replace the Windows Notepad using the registry hack described below. It will also install Notepad2 to C:\Program Files\Notepad2 or an appropriate folder.

Original Post:
This has been tested in Windows 7 64-bit edition, however should work in other versions and 32-bit editions as well.

In the days of Windows 2000, it was easy to replace "notepad.exe" with your own custom version of Notepad, such as the light-weight but powerful Notepad2. Simply find the file and overwrite.

But with Windows XP and later versions, a new feature called "Windows File Protection" prevents you from doing so.

However, you can now replace Notepad system-wide without even touching the original "notepad.exe" using a simple registry hack.


  1. Download Notepad2 (either 32-bit or 64-bit depending on your system). The original version will work fine. There is no need for any hacked versions such as this.
  2. Extract the downloaded archive into an empty folder. This folder should now contain Notepad2.exe and other supporting files.
  3. "Install" Notepad2 by simply copying the folder containing extracted files into "C:\Program Files" (This is not necessary but helps keep your system organized by keeping software in the Program Files folder.)
  4. Start Registry Editor by clicking the Start button and typing in "regedit".
  5. Navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options"
  6. Right-click this folder and create a new key called "notepad.exe" (no quotes)
  7. Inside this new folder, create a new string value (REG_SZ) called "Debugger" (no quotes)
  8. Paste the full path of the new Notepad2.exe file with quotes, and add "/z" at the end. An example would be: --- "C:\Program Files\Notepad2\Notepad2.exe" /z --- but remember that your folder might be different (you can rename the folder).
  9. That's it! Test by running Notepad from the Start Menu and/or double-clicking some TXT files in Windows Explorer.
Enjoy!

    Comments

    1. Evil Tip: Try using this registry hack as a prank! For example, make Windows start WordPad when the user tries to run Microsoft Word.

      ReplyDelete

    Post a Comment

    Comments are moderated, and are usually posted within 24 hours if approved. You must have a minimum of OpenID to post comments.

    Popular posts from this blog

    Disable auto save in JetBrains IDE software (IntelliJ IDEA, PyCharm, PhpStorm)

    JetBrains provides the following IDE software:
    IntelliJ IDEAPhpStormPyCharmRubyMineWebStormAppCodeCLion Google also provides Android Studio which is powered by the IntelliJ platform.

    If you come from a different IDE such as Eclipse, you will be unpleasantly surprised to find that JetBrains-branded IDEs automatically save everything the moment you look away. The proponents argue that as you work on your project, you should not have to worry about saving files. But to others, this auto-save behavior which is enabled by default is a curse that catches them by surprise, and a shocking departure from the workflow they are very much used to.

    You can change the behavior by altering some settings.

    Stop having to click Unblock on every downloaded file

    CAUTION: The blocking of downloaded files in Windows is a security and safety feature to help prevent your computer from being infected by viruses and other malware. Only disable this feature if you know what you're doing.

    I had been plagued by this annoyance since the days of Windows Vista. Any downloaded file, no matter what browser I use, gets tagged as "blocked" by Windows. You can open downloaded documents even though they are blocked, but when you run a downloaded application (such as a setup file) you're presented with a "Security Warning" before you're allowed to run it. It's worse if you extract a downloaded ZIP file with the Windows' built-in ZIP management. Every extracted file is blocked by default.

    Being a geek who finds unnecessary "security" prompts annoying, the first thing I do in Windows is to disable the User Account Control (UAC). But I couldn't quite figure out how to disable blocking of downloaded files until …

    How to change default and internal currency in self-hosted Odoo or OpenERP

    If you wish to use Odoo in a single-currency environment, you will find issues changing the currency in the Odoo interface itself. If you have a self-hosted solution of Odoo or OpenERP, you already have unprecedented control over the system, unlike the cloud-based solution from Odoo. This means that you can very easily fix the issue by hacking the database that Odoo is relying on. Even in a multi-currency environment, you can use the same trick to change the global default currency - the fix is very clean for any environment - there is just an extra step to update the currency rate settings.

    Even in the latest version of Odoo, we still face the ridiculous bug that Odoo internally ALWAYS uses EUR (Euro) as the internal currency. This has created many problems for many users wanting to use a different currency. Despite being set to a different currency from the Odoo interface, the eCommerce site, reports, accounting, etc are still shown using EUR and the Euro symbol, creating confusion…