Community
    • Login

    Does not save the files I need to use

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    18 Posts 4 Posters 6.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Claudia FrankC
      Claudia Frank @tyreese sweet
      last edited by

      @tyreese-sweet

      thx for the info.
      More investigation needed - will follow up.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • tyreese sweetT
        tyreese sweet
        last edited by

        @Claudia-Frank thanks for the help, much appreciated.

        Claudia FrankC 1 Reply Last reply Reply Quote 1
        • Claudia FrankC
          Claudia Frank @tyreese sweet
          last edited by

          @tyreese-sweet

          I assume I found the issue - in short, it is a permission issue.

          Could you try the following

          run regedit
          open the first key HKEY_CLASSES_ROOT
          you now see a list of subkeys starting with . (dot)
          select for example the .ibq(I get this from your the screenshot and I think this is one of the extensions you did not set)
          right click on .ibq and select permission
          now you should see that the user account you are logged in has not been listed
          add it and assign full control
          start notepad++ and check file association - I assume you still have the same values until ibq but nothing afterwards unless
          it is another registered extension.

          Basically the code issue is, only confirmed by reading the code and manipulating registry, that
          notepad++ doesn’t check all registry calls if they are successful
          and I assume that in case you read an extension successfully
          and this extension is a npp registered file
          all subsequent failed registry reads are counted as successful
          unless you read a key successfully which isn’t a npp registered extension.

          Tested on linux, so I would appreciate if one could check on windows to see if this is really the case.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 2
          • Claudia FrankC
            Claudia Frank
            last edited by

            The following is splitted into several posts as it is flagged as spam, maybe it is who knows.

            OK - so I started my win10 virtualbox and did the test and can confirm reported behavior.
            Here the screenshots which description what I’ve done.

            I’m trying to assign .bat. From npp it looks like it is done but registry editor proves that Notepad++_file has NOT been created.
            Reason, the user doesn’t have sufficient permissions

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 1
            • Claudia FrankC
              Claudia Frank
              last edited by

              Adding my user to the .bat key and assigning FULL CONTROL resolves this

              but now we do have a different issue (well it is the issue OP reported)

              As shown (for blg), all keys starting from .bcp to .blg don’t have my account (admin)
              whereas the next key .bmp

              does have it set. So by adding my account to .bcp and restarting notepad++ problem is solved (for this area only).

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 1
              • Claudia FrankC
                Claudia Frank
                last edited by

                So this leads to the assumption that the code (File is regExtDlg.cpp)
                which in general works has a problem when a call fails and as we see that some calls are just called without checking
                the return code I assume that is where the issue starts. ( Not only this part of the code needs improvement)

                Edit - cannot post code part as it is flagged as spam.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 1
                • tyreese sweetT
                  tyreese sweet
                  last edited by

                  @Claudia-Frank
                  Thank you so much for replying and your help. You solved my problem, thank you again and HAPPY NEW YEAR!!!

                  1 Reply Last reply Reply Quote 1
                  • Tom BatesT
                    Tom Bates
                    last edited by

                    Claudia,

                    I see this exact behavior on my Windows 7 dev machine. For each file extension that I want Notepad++ to open with, I must ensure that I have full access to the file extension I want, e.g. .py, and the NEXT file extension in the list, in my case, .qcp. Otherwise, the first case will prevent Notepad++ from saving the .py setting (with no error indication) although it will appear in the file association list until Notepad++ is restarted; and the second case will cause the additional spurious extensions starting from .qcp to be added to the list.

                    BTW I’m using 7.5.4.

                    Thanks so much for investigating and giving us a workaround.
                    Tom

                    1 Reply Last reply Reply Quote 1
                    • Tom BatesT
                      Tom Bates
                      last edited by

                      Claudia,

                      BTW, I wanted to add .frm and .rpt but Notepad++ couldn’t add those either because there are no keys for those two. I added them manually.

                      Thanks
                      Tom

                      1 Reply Last reply Reply Quote 1
                      • Claudia FrankC
                        Claudia Frank
                        last edited by

                        Tom,

                        thank you very much for your additional testing and investigation on this topic.
                        Very much appreciated. Your additional tip should help others too to overcome this limitation.

                        Cheers
                        Claudia

                        1 Reply Last reply Reply Quote 0
                        • Claudia FrankC
                          Claudia Frank
                          last edited by

                          Concerning the wrongly shown file extensions.
                          The above screenshots about .bat registered but dialog
                          shows additional extensions being registered.

                          This drove me some nuts.
                          Whenever I tried to do the same with python and ctypes it worked but
                          npp showed clearly it isn’t.

                          I assume I finally understood what the issue is,
                          it is within RegExtDlg::getRegisteredExts()

                          There is no check if RegOpenKeyEx or RegQueryValueEx succeeded or failed but
                          one could assume that it isn’t necessary as the next if clause checks the previously
                          generated variables valType and valData and if the two reg calls fail then
                          those two variables are invalid.

                          Well, I don’t think this is the case. If I understood correctly what I read it happens
                          that those variables hold the state from the last successful registry calls
                          and I guess this explains very well why we see what we see.

                          So in theory a modification like

                                      ...
                                      TCHAR valData[extNameLen]{'\0'};
                                      ...
                                      int valType = 0;
                          

                          should do the trick.

                          Can someone with a more solid c++ knowledge confirm if this is the case?

                          Thank you and cheers
                          Claudia

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors