Recommended Posts

I have my own version of Notepad that I like, called NotepadEx (http://notepadex.cjb.net/).

I'd like to replace the one that comes with Windows 7, but windows doesn't allow me to do that.

Is there a way to stop Windows from preventing this action file overwrite lock, just for this one action?

Link to comment
https://www.neowin.net/forum/topic/817986-replace-notepadexe-in-win7/
Share on other sites

yes its called take ownership enabler. I dont have the link to it but heres the file.

All you do is add it to the registry then simply right click notepad.exe and select take ownership, this should let you replace it.

Taking_Ownership.zip

I believe Notepad is under Windows File Protection. Why do you have to replace it though? I don't get it. Can't you just set NotepadEx as the default editor for the file types you want?

As for UAC, you shouldn't get an elevation prompt unless it's demanding to run as administrator for some reason. Are you maybe thinking of the Explorer warning that it's from an untrusted source?

Thanks but I don't see the "take ownership" menu item.

Also, every time I try to run NotepadEx, Windows pops up a stupid UAC alert. While UAC alerts are important, how do I stop it for this application?

if you get an UAC popup everytime you run a program it means that program is badly written (writing log entries to a forbidden area for example). Find another program like notepad++ ;)

Now, to override a WFP (windows file protection) file you need to have trusted installer rights...

I'd recommend simply setting a few values in the registry to take care of this:

- Open the Registry Editor

- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

- Create a new key called "notepad.exe" or "npex.exe" (whatever you want to call it, really)

- Set the (Default) string value to the full path of the executable - e.g. C:\Program Files (x86)\App\Program.exe

- Create a new string value and name it Path

- Modify the Path string value to point to the directory containing the executable - e.g. C:\Program Files (x86)\App\

Close the registry, open the Start menu or hit WinKey+R and type in the name of the key you created earlier, such as npex.exe. It should then allow you to launch the application (this will also work for substituting notepad.exe without overwriting it).

I'd recommend simply setting a few values in the registry to take care of this:

- Open the Registry Editor

- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

- Create a new key called "notepad.exe" or "npex.exe" (whatever you want to call it, really)

- Set the (Default) string value to the full path of the executable - e.g. C:\Program Files (x86)\App\Program.exe

- Create a new string value and name it Path

- Modify the Path string value to point to the directory containing the executable - e.g. C:\Program Files (x86)\App\

Close the registry, open the Start menu or hit WinKey+R and type in the name of the key you created earlier, such as npex.exe. It should then allow you to launch the application (this will also work for substituting notepad.exe without overwriting it).

Useful tip. Thanks.

try this:

http://code.kliu.org/misc/notepad2/

Replacing Windows Notepad with Notepad2

Replacing Windows Notepad with Notepad2 can be a little tricky since notepad.exe is a protected system file, which makes a direct replacement a bit difficult (though not impossible).

There is an easier way to replace Windows Notepad by using the "Image File Execution Options" registry key to trick Windows into running notepad2.exe whenever notepad.exe is run. This same trick is used by the "Replace Task Manager" function in Microsoft's Process Explorer. The benefit to using this method to replace Notepad is that you will not run afoul of Windows File Protection (since you are not actually replacing the executable itself), and you can undo it at any time by simply deleting the registry key. The downside to this method is that it does not work properly with the official Notepad2 build; there are a few minor changes that need to be made to Notepad2 in order for this to work (see my img_exec_replace patch).

In order to use this method of Notepad replacement, you will need to follow these steps:

1. Obtain a build of Notepad2 that supports this form of Notepad replacement.

2. Create the following registry key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe.

3. Inside the key, create a new string (REG_SZ) value, named "Debugger".

4. Set the data of this new "Debugger" value to the full path to the Notepad2 executable, followed by the /z switch. For example, "C:\Windows\Notepad2.exe" /z

I believe Notepad is under Windows File Protection. Why do you have to replace it though? I don't get it. Can't you just set NotepadEx as the default editor for the file types you want?

As for UAC, you shouldn't get an elevation prompt unless it's demanding to run as administrator for some reason. Are you maybe thinking of the Explorer warning that it's from an untrusted source?

this

I believe Notepad is under Windows File Protection. Why do you have to replace it though? I don't get it. Can't you just set NotepadEx as the default editor for the file types you want?

As for UAC, you shouldn't get an elevation prompt unless it's demanding to run as administrator for some reason. Are you maybe thinking of the Explorer warning that it's from an untrusted source?

Seriously. It's win7 we're talking about just.. pin the thing to the taskbar? change its icon? I dunno why all the fuss. notepad.exe is a system file and I believe windows will try to repair it /replace it with the original. I guess you could change it so that when you type "notepad" into win+r or the search in the start menu the new one starts. but again, some taskbar 'pinnage' would do the job too

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • This is exactly why I keep saying we are not ready for human free self-driving. These little "bugs" are may seem like random one-offs. There was also the Waymo that drove between police with drawn guns and the suspect they were pointing them at. From a software perspective it is easy to understand how those extremely rare situations may not have been programed for, but that is the point. If AI needs to be told to watch out for every possible contingency, then it can never be successful. There will always be the possibility of a first encounter that the AI needs to understand to avoid.
    • TeraCopy 4.0 Final by Razvan Serea TeraCopy is a compact program designed to copy and move files at the maximum possible speed, also providing you with a lot of features. Copy files faster. TeraCopy uses dynamically adjusted buffers to reduce seek times. Asynchronous copy speeds up file transfer between two physical hard drives. Pause and resume transfers. Pause copy process at any time to free up system resources and continue with a single click. Error recovery. In case of copy error, TeraCopy will try several times and in the worse case just skips the file, not terminating the entire transfer. Interactive file list. TeraCopy shows failed file transfers and lets you fix the problem and recopy only problem files. Shell integration. TeraCopy can completely replace Explorer copy and move functions, allowing you work with files as usual. TeraCopy is free for non-commercial use only. For commercial use you need to buy a license. The paid version of the program includes the following features: Copy/move to your favorite folders. Save reports as HTML and CSV files. Select files with the same extension/folder. Remove the selected files from the copy queue. Download: TeraCopy 4.0 | 14.6MB (Freeware, paid upgrade available) View: TeraCopy Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Recycle Bin has been broken for literal YEARS now. The setting to delete files older than 30 days from the bin which is on by default doesn't even work. I have files older than 4 months in it and they are just there still...
    • They’re really desperate to ingrain AI into society hoping to tug the heart strings of public to jump unto the boat of destruction to humanity’s individualism.
  • Recent Achievements

    • Week One Done
      Eurosoft10 earned a badge
      Week One Done
    • One Month Later
      Eurosoft10 earned a badge
      One Month Later
    • One Year In
      Skeet Campbell earned a badge
      One Year In
    • One Month Later
      Sharbel earned a badge
      One Month Later
    • First Post
      BizSAR earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      587
    2. 2
      +Edouard
      187
    3. 3
      Michael Scrip
      74
    4. 4
      PsYcHoKiLLa
      72
    5. 5
      neufuse
      69
  • Tell a friend

    Love Neowin? Tell a friend!