<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>Notepad Replacer RSS: Doesn't replace right-click Edit in Win11</title>
<atom:link href="https://www.binaryfortress.com/NotepadReplacer/Discussions/RSS/?TopicID=01946bbe-444b-7703-aebd-4f5230856863" rel="self" type="application/rss+xml" />
<link>https://www.binaryfortress.com/NotepadReplacer/Discussions/RSS/?TopicID=01946bbe-444b-7703-aebd-4f5230856863</link>
<description>Notepad Replacer RSS: Doesn't replace right-click Edit in Win11</description>
<lastBuildDate>Fri, 01 May 2026 08:22:30 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.binaryfortress.com/NotepadReplacer/Discussions/RSS/?TopicID=01946bbe-444b-7703-aebd-4f5230856863</generator>
<item>
<title>RE: Doesn't replace right-click Edit in Win11</title>
<link>https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#4</link>
<pubDate>Fri, 31 Jan 2025 18:24:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#4</guid>
<category>Notepad Replacer</category>
<description><![CDATA[We have an idea here for a fix, we'll let you know when we have anything further.
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
We have an idea here for a fix, we'll let you know when we have anything further.<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Doesn't replace right-click Edit in Win11</title>
<link>https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#3</link>
<pubDate>Mon, 27 Jan 2025 16:18:28 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#3</guid>
<category>Notepad Replacer</category>
<description><![CDATA[It works with a normal open on .TXT files.
On .BAT files, right-click "Open" executes the batch file (as it's supposed to) but an "Edit" menu item is presented on the right-click menu. If I pick "Edit", MS's new Win11 version of Notepad launches instead of the configured Notepad++.
I can post a...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
It works with a normal open on .TXT files. <br/>
<br/>
On .BAT files, right-click "Open" executes the batch file (as it's supposed to) but an "Edit" menu item is presented on the right-click menu. If I pick "Edit", MS's new Win11 version of Notepad launches instead of the configured Notepad++.<br/>
<br/>
I can post a video if you want.<br/>
<br/>
This worked OK on Win10.<br/>
<br/>
Suggestions?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Doesn't replace right-click Edit in Win11</title>
<link>https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#2</link>
<pubDate>Mon, 27 Jan 2025 14:31:08 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863#2</guid>
<category>Notepad Replacer</category>
<description><![CDATA[Strange it seems to work fine here. It works if you just do a normal open?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Strange it seems to work fine here. It works if you just do a normal open?
</div>
]]></content:encoded>
</item>
<item>
<title>Doesn't replace right-click Edit in Win11</title>
<link>https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863</link>
<pubDate>Wed, 15 Jan 2025 20:53:40 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.binaryfortress.com/NotepadReplacer/Discussions/View/doesnt-replace-right-click-edit-in-win11/?ID=01946bbe-444b-7703-aebd-4f5230856863</guid>
<category>Notepad Replacer</category>
<description><![CDATA[NotepadReplacer doesn't make the right-click Edit menu item in Win11 launch my preferred replacement (Notepad++). MS Notepad always launches. I've spent an afternoon looking for workarounds, without any luck. Here's as far as I got (trying to replace with Notepad++):
def installNotepadPlusPlus()...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
NotepadReplacer doesn't make the right-click Edit menu item in Win11 launch my preferred replacement (Notepad++). MS Notepad always launches. I've spent an afternoon looking for workarounds, without any luck. Here's as far as I got (trying to replace with Notepad++):<br/>
<br/>
<div class="Inline"><pre>def installNotepadPlusPlus():
    """Notepad++"""

    log("Installing Notepad++...", printit=True)

    # remove any pre-existing choco install

    output, return_code = do(R"choco uninstall notepadplusplus --remove-dependencies", suppress_errors=True) # in case there was a choco install previously
    if return_code == 0:
        log(f"Removed pre-existing Notepad++ choco install.", printit=True)
    elif return_code == 1:
        pass # wasn't any previous choco install
    else:
        raise RuntimeError(f"Error uninstalling Notepad++ with choco: {output}")

    wingetInstall('Notepad++.Notepad++ -a x64') # force 64 bit version so it will be found in %ProgramFiles% (not %ProgramFiles(x86)%)

    log("Creating edit.bat...")

    with open(t.BinPath + R'\edit.bat', "w") as ed:
        ed.write(R'@start /b "" "' + 'notepad++' + R'" %*')

    unzip(R'auto_install\Notepad++_ROAMING.7z', os.environ[R'AppData'] + R'\Notepad++')

    try:
        log("Removing old plugins...")
        shutil.rmtree(R'C:\Program Files\Notepad++\plugins')
    except PermissionError:
        pass # probably NP++ is running
    
    output, return_code = unzip(R'auto_install\Notepad++_PLUGINS.7z', R'C:\Program Files\Notepad++\plugins', suppress_errors=True)
    if return_code and "ERROR: Cannot delete output file" not in output: # this happens if NP++ is running
        raise RuntimeError(f"Unable to install Notepad++ plugins: {output}")

    x64_folder = os.path.expandvars(R'%ProgramFiles%\Notepad++')
    nppp_exe = os.path.join(x64_folder, 'notepad++.exe')

    do(R"choco install notepadreplacer --params='" + R'"/NOTEPAD:' + nppp_exe + R' /verysilent"' + R"' -y") # not available on winget as of 2024-12-10

    # Notepad++ for editing text files (esp .log files)
    do(R'ftype txtfile="' + nppp_exe + R'" "%%1"')

    # Make files without any extension open in Notepad++
    do(R'assoc .="(none)"')
    do(R'ftype "(none)"="' + nppp_exe + R'" "%%1"')
    do(R'assoc "(none)"\DefaultIcon=%SystemRoot%\System32\imageres.dll,-102') # use text file icon

    # associate .xml files with NP++
    do(R'assoc .xml=txtfile')

    # make symlink to program for stuff like FileZilla that look in the wrong folder for it
    x86_folder = os.path.expandvars(R"%ProgramFiles(x86)%\Notepad++")

    try:
        if not os.path.islink(x86_folder):
            shutil.rmtree(x86_folder)
            log(f"Removed old {x86_folder} to make room for a symlink to {x64_folder}")
    except FileNotFoundError:
        pass

    symlinkFolder(x64_folder, x86_folder)
  
    if WindowsVersion() &gt;= 11:  # added to support Win11

        ''' this doesn't work yet. I haven't found a robust solution that works in all cases 

            See: https://community.notepad-plus-plus.org/topic/21991/replace-notepad-on-windows-11/21
                 https://www.winhelponline.com/blog/replace-notepad-text-editor-notepad-plus-association/
        '''

        # remove app store version of Notepad (Win11 version)
        # do(R'powershell -command "Get-AppxPackage *Microsoft.WindowsNotepad* | Remove-AppxPackage"')
     
        # # create file that starts notepad++ in the path
        # with open(os.path.join(t.LocalBinPath, "notepad.bat"), "w") as notepad_bat:
        #     notepad_bat.write("@" + nl.quote(nppp_exe) + ' %*')

        # regAddKey(R'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe', 'UseFilter', winreg.REG_DWORD, 0)
        # regAddKey(R'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe', 'Debugger', winreg.REG_SZ, R'%ProgramFiles%\Notepad++\notepad++.exe -notepadStyleCmdline -z')
    
        # regDeleteKey(R'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe', 'UseFilter')
        # regDeleteKey(R'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe', 'Debugger')
        
        
        R''' # I don't know why this doesn't work - Win11 says it can't find the file to be edited (not a quoting issue)
        notepad_exe_locations = [R'%SystemRoot%', R'%SystemRoot%\System32', R'%SystemRoot%\SysWOW64' ]

        for location in notepad_exe_locations:
            old_notepad_exe = os.path.join(os.path.expandvars(location), "notepad.exe") # old notepad.exe
            if os.path.exists(old_notepad_exe):

                # Take ownership and grant permissions
                do(Rf'takeown /f {old_notepad_exe}')
                do(Rf'icacls {old_notepad_exe} /grant administrators:F')

                if not os.path.islink(old_notepad_exe): 
                    os.rename(old_notepad_exe, old_notepad_exe + '.old')
        
                symlinkFile(nppp_exe, old_notepad_exe) 
        '''

    log(f"Installed and configured Notepad++ {x64_folder} to {x86_folder}", printit=True)</pre></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>