Help With Notepad++: Double Click On Any Txt File Defaults To "new1.txt"

Discussion in 'Software' started by GoshenGeek, Nov 16, 2018.

  1. GoshenGeek

    GoshenGeek Corporal

    System: Windows 7 Home Premium SP 1, 64 bit

    This is strange. Problem started when I upgraded notepad++ from version 7.5.9 and to version 7.6. When I double click on a txt file, no matter what the file name, notepad++ opens with an empty file named "new1.txt". Thus the file I clicked may have the name hello.txt and have lots of text in the file, but when I double click the file, notepad++ opens with a blank file "new1.txt".
    Note that if I right click on the txt file and select "Edit with notepad++", this works fine - notepad++ opens with that file.
    Below is what I did to try and fix the problem (nothing worked) plus some other symptoms.
    (1) Uninstalled version 7.6 and installed 7.5.6
    (2) Ensure that assoc txt=txtfile & ftype txtfile="C:\Program Files (x86)\Notepad++\notepad++.exe"
    (3) Ensure that in notepad++, Settings ==> Preferences ==> Misc that the field "Session file ext" is blank.
    (4) Maybe this is the problem?? Control panel --> Programs --> Default programs --> Set associations
    ".txt" does NOT show in the list of extensions. Yet note #2 above. How can this be? Why doesn't the .txt extension show up in the Control Panel listing????
    (5) Note that if I right click the file hello.txt & choose Open with --> Notepad++, notepad++ again opens with the blank new1.txt.
    Yet right clicking and selecting "Edit with notepad++" works fine. How can this be???
    (6) If I right click the file hello.txt & choose Open with --> Choose default program, notepad++ is displayed. But again when I select notepad++ and on Ok, I again get the empty file new1.txt

    At this point I have no idea what to do. Any suggestions?????
     
  2. Eldon

    Eldon Major Geek Extraordinaire

    Try this:
    1. Change the default program for text (.txt) files back to Notepad that's included with Windows.
    2. Check whether .txt is now available in Set Associations.
    3. If it is, change it to Notepad++ from there.
     
  3. GoshenGeek

    GoshenGeek Corporal

    I'll try that and let you know.

    In the meantime, I just discovered another symptom of the problem I have two accounts - Administrator & Standard user. Double clicking on a txt file in the Administrator account works correctly!! But this does NOT work in the Standard user account.
    And the Control panel of associations with the Administrator account DOES show the txt association.
    So I think that is the problem with the standard user account but I don't know how to fix it.
    I'll try your solution and let you know.

    Does this help with diagnosing the problem?
     
  4. _nullptr

    _nullptr Major Geeky Geek Geek

    By correctly, do you mean that it opens in notepad or notepad++?
    If it's notepad, then open notepad and copy/paste the content of the following code box. Save it somewhere convenient as Save as type: All Files (*.*), name Fix.reg
    Double click and allow the reg file to merge with the registry.
    You may need to log off/on for the change to take effect.
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
    "PerceivedType"="text"
    @="txtfile"
    "Content Type"="text/plain"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\PersistentHandler]
    @="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\ShellNew]
    "ItemName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
      6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
      00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,\
      2d,00,34,00,37,00,30,00,00,00
    "NullFile"=""
    
     
  5. _nullptr

    _nullptr Major Geeky Geek Geek

    Ignore the above post as your problem is confined to your user hive.
     
  6. GoshenGeek

    GoshenGeek Corporal

    I tried Eldon's solution. I now have a file association of txt in the control panel associations, BUT double clicking a txt file in my standard user account still opens a blank file called new1.txt. And only the Standard user account is affected. Double clicking a txt file in the Administrator account correctly opens notepad++ with that file.
    Very strange.

    I will try tomorrow uninstalling notepad++, getting rid of all notepad++ settings in the registry (after I create a restore point!), then installing an early version of notepad++.
     
  7. Stephen_c16

    Stephen_c16 Master Sergeant

    Just throwing it out there...
    Why don't you not double click the txt file. Instead Right click it and Move the cursor to Open with and choose notepad++.
    You might have to find it from the list.
    Good luck.
    s.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds