2

When I navigate to C:\Windows\System32\ and double-click on notepad.exe, it instead launches Textpad. I HATE Textpad. I want to restore the usual behaviour of loading Notepad.

The odd thing is, that notepad.exe looks like the usual Notepad that I would expect (see screenshot below). When I copy notepad.exe from another computer and paste it as "notepad-II.exe", double-clicking that opens Notepad as expected. But when I do a Beyond Compare on notepad.exe and notepad-II.exe, it says "Binary Same". However running "notepad.exe" launches Textpad, while running "notepad-II.exe" launches Notepad.

So my next step was to rename "notepad.exe" to "notepad-OLD.exe" and rename "notepad-II.exe" to "notepad.exe". No such luck, I "need permission from TrustedInstaller to perform this action", and no matter what I do from here, whether it be run as Administrator, or try and grant permission to myself, I get "Access is denied".

Help! How do I make notepad.exe launch Notepad like it is supposed to?

I am running Windows Server 2008 R2 Standard with Service Pack 1.

Why does notepad.exe launch Textpad??

2
  • 1
    I hate that I cant remember how I used to do this. Until you can resolve it (and since you hate textpad), just uninstall textpad. But if you want to really find out how it happened and how to fix it, I've used Total Uninstall to watch exactly what the installer does, then undo what you find after. If you don't want to uninstall textpad for some reason, download Notepad++ and do the total uninstall thing (fairly certain the same effect is achieved). Good luck :)
    – Deryck
    Nov 13, 2014 at 2:23
  • @Deryck, I was going to give that a go, but I was worried then about having notepad.exe do nothing at all when running it, I mean, better Textpad than nothing :) I'm going to give the Total Uninstall thing a look though, cheers.
    – Matt
    Nov 13, 2014 at 2:34

1 Answer 1

1

I found an answer from a colleague.

From Textpad: Configure -> Preferences -> General
Untick "Replace Notepad".
Click OK.

I wish I knew what this is doing behind the scenes, because it's very scary to me that an application can make another application launch when double clicking an EXE in Windows Explorer, especially an essential component of Windows such as notepad.exe. I'm surprised that an application has this much power.

5
  • I'm not sure what the magic is, but is it 32 or 64 bit windows? Becasue in 64-bit windows there is also C:\Windows\SysWOW64\notepad.exe
    – Tyson
    Nov 14, 2014 at 1:39
  • @Tyson 64 bit - I checked and Textpad takes over both System32 and SysWOW64 versions of Notepad.
    – Matt
    Nov 14, 2014 at 3:16
  • But still not how textpad takes over? I would love to know also, I suspected before your reply that textpad replaced the SysWOW64 version and that version was found first (PATH) or running the 32-bit file triggered a check for the 64-bit and if the 64 exists then terminate this run that. I'm very curious about this question but I won't be able to experiment for about 10 days (I'm away from normal-ness with limited resources. I dropped a link to this question on my calender for a few days after I'm back if there is nothing explained by then, I'll experiment.
    – Tyson
    Nov 14, 2014 at 14:19
  • Based on <forums.malwarebytes.org/index.php?/topic/…>, TextPad is probably using using the "Image File Execution Options" registry key to replace execution of executables with the particular file name notepad. exe. Check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options for an entry called NOTEPAD.exe.
    – RJHunter
    Nov 16, 2014 at 23:12
  • @Tyson no, sadly, I still don't know exactly how Textpad implements that option, and how it takes over the notepad.exe executable. RJHunter's suggestion is interesting, and completely new to me.
    – Matt
    Nov 17, 2014 at 3:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .