set "Image File Execution Options" will always open the named exe file as default

Posted by Weixiao.Fan on Stack Overflow See other posts from Stack Overflow or by Weixiao.Fan
Published on 2010-06-06T16:02:50Z Indexed on 2010/06/06 16:32 UTC
Read the original article Hit count: 143

Filed under:

just as this link says : http://untidy.net/blog/2009/11/03/replacing-notepad-with-pn-via-image-file-execution-options/

I wanna replace Notepad.exe to Notepad2.exe using "Image File Execution Options" function by run this command

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"c:\windows\Notepad2.exe\" /z" /f

but, when I run notepad, it open file c:\windows\notepad.exe in notepad2.exe as a text file by default. Is there a way to avoid that?

I know using this tech Notepad.exe will as the first param passed to Notepad2.exe. but I don't know how to avoid this :(

© Stack Overflow or respective owner

Related posts about windows-registry