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

    • There is a saying in my country: "The wolf has a thick neck because he does his own work." Let that sink in
    • Interesting image choice... reminds me of the human centipede poster
    • Get $50 of aloSIM Mobile Data Traveler eSim credit for just $24.97 by Steven Parker Today's highlighted deal comes via our Apps + Software section of the Neowin Deals store, where you can save 50% off aloSIM Mobile Data Traveler Lifetime eSim Credit: Pay $24.97 for $50. Stay connected affordably in 120+ countries/regions with your own lifetime eSIM! An eSIM is a digital SIM card. It's basically just mobile data. Once it's activated on your device, it can connect you to data networks in other countries – giving you an internet connection with NO roaming charges. With aloSIM, you can load prepaid eSIM data packages onto your phone, tablet, or computer. Your lifetime eSIM never expires, so it's yours forever and there are never any monthly charges. You'll get $50 in eSIM data credit, which is almost always enough to cover all your data roaming needs for a full year. But if you run out of data, you can always top up your lifetime eSIM and stay connected internationally. Pay $24.97 for a lifetime eSIM with $50 in travel data credit Use your eSIM to join data networks in 120+ countries Install your lifetime eSIM on a compatible device to roam on local data networks Your lifetime eSIM never expires, and can be topped up with more data anytime Many data packages cost as little as $4.50 and last 7 days. Depending on the package you choose, the length of time varies. Good to know Length of access: lifetime For NEW customers only Instant digital redemption Once you add your $50 credit to your aloSim account you have up to 12-months to use it — after that your credit will expire When you pay for a data plan you also get a free phone number (via Hushed) for the same duration of your plan that was purchased - IE 7 day eSim plan gives you a free 7-day phone number Purchased coupon must be redeemed and used within 12 months This deal is not stackable (one offer per aloSIM account) A $4.50 data package will last 7 days The data DOES expire, and you WILL NOT have any leftover data for your next trip unless it takes place within the validity period. While the eSIM never expires, the actual data package is only valid for the length of time stated at purchase (i.e. seven days after activation, 30 days after activation, etc.) So if you buy a seven-day package and only use a tiny bit, that package is still going to expire after seven days. Access options: mobile (check compatibility) Max number of device(s): 1 Updates included Here's the deal: This aloSIM Mobile Data Traveler eSim $50 Credit normally costs ... $50, but it can be yours for just $24.97 for a limited time, a saving of $25 (50% off). For specifications, and license info please click the link below. Get this aloSIM Mobile Data Traveler eSim for just $24.97 (was $50) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
  • Recent Achievements

    • First Post
      DrWankel earned a badge
      First Post
    • Reacting Well
      DrWankel earned a badge
      Reacting Well
    • Week One Done
      Supreme Spray LV earned a badge
      Week One Done
    • One Month Later
      Genuinetonerink- Dubai earned a badge
      One Month Later
    • Week One Done
      Genuinetonerink- Dubai earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      +Edouard
      158
    3. 3
      PsYcHoKiLLa
      90
    4. 4
      Steven P.
      74
    5. 5
      Michael Scrip
      72
  • Tell a friend

    Love Neowin? Tell a friend!