How do I reorder the items in Explorer's New menu in Windows 10?











up vote
1
down vote

favorite












How do I move an item above the separator line in the New submenu of Windows 10's right-click context menu?



Is there anything in the Registry that needs to be set?



Right Click Menu Example










share|improve this question




























    up vote
    1
    down vote

    favorite












    How do I move an item above the separator line in the New submenu of Windows 10's right-click context menu?



    Is there anything in the Registry that needs to be set?



    Right Click Menu Example










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      How do I move an item above the separator line in the New submenu of Windows 10's right-click context menu?



      Is there anything in the Registry that needs to be set?



      Right Click Menu Example










      share|improve this question















      How do I move an item above the separator line in the New submenu of Windows 10's right-click context menu?



      Is there anything in the Registry that needs to be set?



      Right Click Menu Example







      windows windows-10 windows-registry






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 at 20:38









      Ben N

      28.8k1394140




      28.8k1394140










      asked Nov 21 at 4:18









      Saud Iqbal

      62




      62






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Create a Config subkey under the ShellNew key of your file type. Then inside that subkey, add a string value named BeforeSeparator. The change should take effect immediately:







          To figure this out, I had to dive into the Explorer code. shell32.dll contains a CNewMenu class that represents the New menu and has a function named _BeforeSeparator that determines whether the given entry should be placed before the separator. Here's the important part of that function's disassembly (courtesy of IDA):





          First it uses PathMatchSpecW to see if the key name is one of .lnk, .library-ms, or Folder. If it is (red/left path), the item is guaranteed to appear above the line. If not (green/right path), the function checks whether a certain bit (10h) in a certain part (+8) of the data structure is set.



          I needed to find the code responsible for setting that bit. There's a function called _GetNewObjectInfoForKey that seems to be responsible for setting up the relevant data structures. Here's part of its disassembly, almost right at the beginning:





          It tries to open a subkey called Config and, if successful (red path), uses the _GetConfigFlags function to set the part of the data structure containing the bit we're interested in! _GetConfigFlags goes along testing for the existence of various entries and setting various bits if appropriate. Here's the part that sets our target bit (10h):





          And there we see the desired entry name: BeforeSeparator.






          share|improve this answer























          • +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
            – Biswapriyo
            Nov 23 at 3:01











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377164%2fhow-do-i-reorder-the-items-in-explorers-new-menu-in-windows-10%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Create a Config subkey under the ShellNew key of your file type. Then inside that subkey, add a string value named BeforeSeparator. The change should take effect immediately:







          To figure this out, I had to dive into the Explorer code. shell32.dll contains a CNewMenu class that represents the New menu and has a function named _BeforeSeparator that determines whether the given entry should be placed before the separator. Here's the important part of that function's disassembly (courtesy of IDA):





          First it uses PathMatchSpecW to see if the key name is one of .lnk, .library-ms, or Folder. If it is (red/left path), the item is guaranteed to appear above the line. If not (green/right path), the function checks whether a certain bit (10h) in a certain part (+8) of the data structure is set.



          I needed to find the code responsible for setting that bit. There's a function called _GetNewObjectInfoForKey that seems to be responsible for setting up the relevant data structures. Here's part of its disassembly, almost right at the beginning:





          It tries to open a subkey called Config and, if successful (red path), uses the _GetConfigFlags function to set the part of the data structure containing the bit we're interested in! _GetConfigFlags goes along testing for the existence of various entries and setting various bits if appropriate. Here's the part that sets our target bit (10h):





          And there we see the desired entry name: BeforeSeparator.






          share|improve this answer























          • +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
            – Biswapriyo
            Nov 23 at 3:01















          up vote
          1
          down vote













          Create a Config subkey under the ShellNew key of your file type. Then inside that subkey, add a string value named BeforeSeparator. The change should take effect immediately:







          To figure this out, I had to dive into the Explorer code. shell32.dll contains a CNewMenu class that represents the New menu and has a function named _BeforeSeparator that determines whether the given entry should be placed before the separator. Here's the important part of that function's disassembly (courtesy of IDA):





          First it uses PathMatchSpecW to see if the key name is one of .lnk, .library-ms, or Folder. If it is (red/left path), the item is guaranteed to appear above the line. If not (green/right path), the function checks whether a certain bit (10h) in a certain part (+8) of the data structure is set.



          I needed to find the code responsible for setting that bit. There's a function called _GetNewObjectInfoForKey that seems to be responsible for setting up the relevant data structures. Here's part of its disassembly, almost right at the beginning:





          It tries to open a subkey called Config and, if successful (red path), uses the _GetConfigFlags function to set the part of the data structure containing the bit we're interested in! _GetConfigFlags goes along testing for the existence of various entries and setting various bits if appropriate. Here's the part that sets our target bit (10h):





          And there we see the desired entry name: BeforeSeparator.






          share|improve this answer























          • +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
            – Biswapriyo
            Nov 23 at 3:01













          up vote
          1
          down vote










          up vote
          1
          down vote









          Create a Config subkey under the ShellNew key of your file type. Then inside that subkey, add a string value named BeforeSeparator. The change should take effect immediately:







          To figure this out, I had to dive into the Explorer code. shell32.dll contains a CNewMenu class that represents the New menu and has a function named _BeforeSeparator that determines whether the given entry should be placed before the separator. Here's the important part of that function's disassembly (courtesy of IDA):





          First it uses PathMatchSpecW to see if the key name is one of .lnk, .library-ms, or Folder. If it is (red/left path), the item is guaranteed to appear above the line. If not (green/right path), the function checks whether a certain bit (10h) in a certain part (+8) of the data structure is set.



          I needed to find the code responsible for setting that bit. There's a function called _GetNewObjectInfoForKey that seems to be responsible for setting up the relevant data structures. Here's part of its disassembly, almost right at the beginning:





          It tries to open a subkey called Config and, if successful (red path), uses the _GetConfigFlags function to set the part of the data structure containing the bit we're interested in! _GetConfigFlags goes along testing for the existence of various entries and setting various bits if appropriate. Here's the part that sets our target bit (10h):





          And there we see the desired entry name: BeforeSeparator.






          share|improve this answer














          Create a Config subkey under the ShellNew key of your file type. Then inside that subkey, add a string value named BeforeSeparator. The change should take effect immediately:







          To figure this out, I had to dive into the Explorer code. shell32.dll contains a CNewMenu class that represents the New menu and has a function named _BeforeSeparator that determines whether the given entry should be placed before the separator. Here's the important part of that function's disassembly (courtesy of IDA):





          First it uses PathMatchSpecW to see if the key name is one of .lnk, .library-ms, or Folder. If it is (red/left path), the item is guaranteed to appear above the line. If not (green/right path), the function checks whether a certain bit (10h) in a certain part (+8) of the data structure is set.



          I needed to find the code responsible for setting that bit. There's a function called _GetNewObjectInfoForKey that seems to be responsible for setting up the relevant data structures. Here's part of its disassembly, almost right at the beginning:





          It tries to open a subkey called Config and, if successful (red path), uses the _GetConfigFlags function to set the part of the data structure containing the bit we're interested in! _GetConfigFlags goes along testing for the existence of various entries and setting various bits if appropriate. Here's the part that sets our target bit (10h):





          And there we see the desired entry name: BeforeSeparator.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Nov 22 at 21:08









          Ben N

          28.8k1394140




          28.8k1394140












          • +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
            – Biswapriyo
            Nov 23 at 3:01


















          • +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
            – Biswapriyo
            Nov 23 at 3:01
















          +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
          – Biswapriyo
          Nov 23 at 3:01




          +1 for the assembly. Context menu registry changes can be applied with Explorer restart (without rebooting).
          – Biswapriyo
          Nov 23 at 3:01


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377164%2fhow-do-i-reorder-the-items-in-explorers-new-menu-in-windows-10%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          RAC Tourist Trophy