7
NewbieNewbie
7

    Jun 25, 2008#16

    Any updates on this? I had a hard drive crash, rebuilt the system with the restore disk that came with the computer (WinXP Tablet, SP2), and can't get this to work. I'm pretty sure it was working before. No matter how many ways I delete/move/copy/rename notepad.exe in /windows, /windows/system32/ and /windows/system32/dllcache, I can't get it to stick. The file reverts immediately.

    I've also edited filelist.xml as described in http://blogs.msdn.com/omars/archive/200 ... 24093.aspx . This did not help. I stopped short of doing a binary edit of a system dll and registry edit to disable system file protection. (Sorry, I can't find the link for that page now)

    [edit]

    Okay, I think I licked this. I deleted /windows/i386/notepad.ex_ , after making a copy of it first. (I didn't just rename it, as I don't trust Windows to respect what I'm doing at this point.) Then I could replace notepad.exe in the three locations indicated above, and it seems to work. I didn't try copying the new and improved notepad.exe to notepad.ex_ there...that might make things go smoother, I don't know.

    If that doesn't work for you, search for folders named "i386" on your system. See if it (they?) have a notepad.exe or notepad.ex_ file. It seems this folder can exist in different places depending on your vendor and possibly other factors? Make sure to search for hidden and system files (under advanced search options).

    If that doesn't pan out, search for notepad.* across your whole system and see how that goes.

    Good luck!

    -dave

    2
    NewbieNewbie
    2

      How to replace Notepad with 64-bit UltraEdit?

      Sep 29, 2015#17

      For many years I've been replacing Notepad.exe with a 21k stub Notepad.exe from the UltraEdit website and this isn't working with UltraEdit 64 v22.20.0.28 under Win7 Pro 64-bit.

      No matter where I put the sub Notepad.exe, when I run it nothing happens. I think the problem is that it's searching my path for uedit32.exe and I instead have uedit64.exe now.

      Where can I find an updated version of this sub Notepad.exe that looks for uedit64.exe?

      FYI, I think I got this particular stub Notepad.exe from the UltraEdit website around 2002. It came in a archive named Notepad.zip along with a "notepad.txt" file that starts with "INSTRUCTIONS FOR REPLACING NOTEPAD WITH ULTRAEDIT-32"

      Checksums on that notepad.zip file:
      md5: 4f61063fab2013abeac22076be00c3fd
      sha1: 01052673492339f77c69bfbcd220604fe4eeca70
      sha256: 99f2e52e73dff81868d676d014af08b9b959b564627df2b6cc9a25dc168453ad

      6,685587
      Grand MasterGrand Master
      6,685587

        Re: How to replace Notepad with 64-bit UltraEdit?

        Sep 29, 2015#18

        Microsoft was not happy about Notepad.exe compiled by IDM Computer Solutions, Inc. for replacing Windows Notepad.exe. Therefore this executable respectively the ZIP file containing it has been removed by IDM from the website more than 10 years ago and it will be never come back.

        This Notepad replacement tool does not search in directory listed in string value of environment variable PATH to find uedit32.exe. Instead it determines existence and location of uedit32.exe like it is done by
        • UltraCompare Professional,
        • the tool ueFastStart and
        • command start of Windows command processor (cmd.exe) when a user typed on command line or put into a batch file the following command line with uedit32.exe not found in any directory of environment variable PATH.

          Code: Select all

          start "" uedit32.exe "Path\File 1.txt" "Path\File 2.txt"
        It looks for registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit32.exe and when found takes the string of default string value containing uedit32.exe with full path as this demo batch file does it, too.

        Code: Select all

        @echo off
        set "TextEditor=%windir%\Notepad.exe"
        for /F "skip=2 tokens=2* delims=	" %%A in ('%SystemRoot%\System32\reg.exe QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit32.exe" /ve 2^>nul') do (
            if "%%A" == "REG_SZ" set "TextEditor=%%B" & goto RunTextEditor
        )
        
        for /F "skip=2 tokens=2* delims=	" %%A in ('%SystemRoot%\System32\reg.exe QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit64.exe" /ve 2^>nul') do (
            if "%%A" == "REG_SZ" set "TextEditor=%%B" & goto RunTextEditor
        )
        
        :RunTextEditor
        "%TextEditor%" %*
        set "TextEditor="
        
        Note: There is only 1 character between delims= and " in both FOR lines which must be a horizontal tab character. The browser displays the tab character with multiple spaces according to HTML standard.

        I suggest following if you want to continue using the Notepad.exe replacement for 64-bit version of UltraEdit.
        1. Open this executable in UltraEdit. As it is a binary file, it will be displayed in hex editing mode.
        2. Press Ctrl+R to open Replace dialog for hex editing.
        3. Enter as search string uedit32.exe and as replace string uedit64.exe
        4. Check option Find ASCII and uncheck Match case and Regular expressions (ASCII only)
        5. Click on button Replace All. Two items will be replaced.
        6. Save modified Notepad.exe and close the file.
        Now this executable should search for uedit64.exe in Windows registry and start it with the parameters passed to the executable itself.
        Best regards from an UC/UE/UES for Windows user from Austria

        2
        NewbieNewbie
        2

          Oct 05, 2015#19

          That worked like a charm! Opened the old "stub" notepad.exe in UEdit, replaced the 2-3 instance of "uedit32.exe" with "uedit64.exe" and it works great!

          Alternately I found that renaming the "uedit64.exe" program to "uedit32.exe" seemed to work too, but I far prefer your solution. Renaming the UltraEdit program probably causes some problems I didn't run into during my brief tests.

          Thanks for that detailed response! This makes using a few of my portable programs that call on Notepad.exe a lot nicer.

          79
          Advanced UserAdvanced User
          79

            Oct 05, 2015#20

            In case anyone finds this useful, here's what I do to associate file types with something better than the stock notepad. As far as I know, this is completely supported by Microsoft:

            Code: Select all

            #  the following to use notepad2 for inf, ini, and txt files:
            
            ftype inffile=c:\util\notepad2.exe "%1"
            ftype inifile=c:\util\notepad2.exe "%1"
            ftype txtfile=c:\util\notepad2.exe "%1"
            
            # the following associate extensions with the txtfile type:
            
            assoc .gitattributes=txtfile
            assoc .gitignore=txtfile
            assoc .gitmodules=txtfile
            assoc .log=txtfile
            assoc .scp=txtfile
            assoc .txt=txtfile
            assoc .wtx=txtfile
            
            Just replace the commands invoking notepad2 with the appropriate commands for whatever variant of UltraEdit you want.

            Read more posts (-10 remaining)