Replace Notepad using "Image File Execution Option"

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 7
Joined: Fri Jul 08, 2011 11:04 am

Replace Notepad using "Image File Execution Option"

Post by drkh »

Hello,

I didn't use AkelPad's installer to replace Notepad. I used the following method (on Win7 x64):

Under the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

I created a sub-key: "notepad.exe".

Inside that new sub-key, I created a string value:"Debugger". The data of this value points to AkelPad.exe.

Now, every time when Notepad is intended to run, it's AkelPad which is executed instead. Great! I successfully repalced Notepad with AkelPad.

But there is a problem.

When AkelPad is executed in place of Notepad, AkelPad will think that the executable file of Notepad itself is a file to be opened. So, the following message appears:

"C:\Windows\Notepad.exe" is a binary file. Continue?

How can I solve this problem?

Offline
Posts: 7
Joined: Fri Jul 08, 2011 11:04 am

Post by drkh »

I managed to find the solution.

The solution is to add the /z parameter to the command line, with the purpose being to "ignore next command line parameter", as stated in AnkelPad's help file "AkelHelp-Eng.htm".

But it takes me a while to realize that when AnkelPad starts to run in place of Notepad, the Notepad executable becomes "the next command line parameter".

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

AkelPad 4.6.1 release wrote:Added: command line option /Z to ignore the next command line parameter. Can be used for alternative way to replace MS Notepad.
There are also two batch files posted on Russian FAQ.

Offline
Posts: 1
Joined: Sun Mar 04, 2012 7:31 am

Post by lextm »

Instructor wrote:
AkelPad 4.6.1 release wrote:Added: command line option /Z to ignore the next command line parameter. Can be used for alternative way to replace MS Notepad.
There are also two batch files posted on Russian FAQ.
Hi, I am wondering if this can be made as the default way to "replace Notepad". On Windows Vista/7/8, it is no longer possible to replace C:\Windows\Notepad.exe, so this alternative is a must. You should revise the installer as soon as possible, as more and more people start to upgrade.
Post Reply