Since Microsoft insists on keeping the traditional Notepad in their latest Windows 10 operating system, I decided to make a script to install and replace notepad.exe with Notepad++. Since Notepad.exe is considered a system file, the script must update the file ownership before Windows will allow the NTFS permissions changes required to replace the executable file.
Note: Windows keeps three copies of Notepad.exe, so the script will backup and replace each of the three Notepad.exe files.
- Download and install Notepad++ https://notepad-plus-plus.org/download
- Download the replace_notepad.ps1
- Open the PowerShell console as administrator from your Windows 10 computer.
- Within the PowerShell console, go to the folder that containing the script you downloaded in step 2. For example: cd c:\users\lexh\downloads
- Make sure your computer can run scripts by setting the Execution Policy to Unrestricted. To do this, type the following command in the console Set-ExecutionPolicy Unrestricted and press enter.
- Press [Y] Yes or [A] Yes to all to change the execution policy.
- Run the script by typing the following command: .\replace_notepad.ps1
- You will see a security warning, just press [R] Run once to execute the script
You should see one or more success messages confirming your notepad was replaced.