Adapting .REG Files.

Page 1 of 13 12311 ... LastLast

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Adapting .REG Files.


    I came across these somewhere [sorry I can't remember where or I would credit the owner].

    I know that Icon and Position are optional, but MUIVerb and SubCommands are compulsory.
    Code:
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\AdvancedStartupOptions]"
    MUIVerb"="Advanced Startup Options""
    Icon"="cmd.exe""
    Position"="Bottom"
    
    HKEY_CLASSES_ROOT\DesktopBackground\Shell\AdvancedStartupOptions\command]@="shutdown.exe /r /o /f /t 0"
    Will there be any impact with NOT including the SubCommand?

    Similarly . . .
    Code:
    [HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
    @="Take Ownership"
    "HasLUAShield"=""
    "NoWorkingDirectory"=""
    "NeverDefault"=""
    
    [HKEY_CLASSES_ROOT\*\shell\TakeOwnership\command]
    @="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l & pause' -Verb runAs\""
    "IsolatedCommand"= "powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l & pause' -Verb runAs\""
    
    [HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership]
    @="Take Ownership"
    "HasLUAShield"=""
    "NoWorkingDirectory"=""
    "NeverDefault"=""
    
    [HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership\command]
    @="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" /r /d y && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l /q & pause' -Verb runAs\""
    "IsolatedCommand"="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" /r /d y && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l /q & pause' -Verb runAs\""
    Can you please tell me whether this just gets added to to the Bottom in the Desktop Context Menu or the Folder Context Menu etc?

    Finally . . .
    Code:
    [-HKEY_CLASSES_ROOT\DesktopBackground\Shell\KillNotResponding]
    I assume that this puts it at the Top of the Desktop Context Menu?
    Is there anyway to adapt it so I could put it at say the Middle or Bottom?

    Thanks in advance.
    Last edited by Paul Black; 20 Feb 2020 at 04:18.
      My Computer


  2. Posts : 7,607
    Windows 10 Home 20H2
       #2

    Paul Black said:
    Will there be any impact with NOT including the SubCommand?
    I believe but am not sure that no SubCommand is used in my script: Context Menu Option to Concatenate Audio Files
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #3

    Thanks for the link Matthew Wai,

    Matthew Wai said:
    I believe but am not sure that no SubCommand is used in my script: Context Menu Option to Concatenate Audio Files
    What I am aiming for is to have ALL the important things in the Context Menu, but I would like to be able to position them exactly where I want to, and have them available in the Desktop, File, Folder etc without using ANY third-party software. I am pretty much there really.

    Thanks in advance.
      My Computer


  4. Posts : 7,607
    Windows 10 Home 20H2
       #4

    Paul Black said:
    Will there be any impact with NOT including the SubCommand?
    Code:
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Testing1]
    "Icon"="cmd.exe"
    "Position"="Bottom"
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Testing1\command]
    @="Winver"
    I have just imported the above and see no impact.
      My Computer


  5. Posts : 17,838
    Windows 10
       #5

    Put the entries in either:

    Computer\HKEY_CLASSES_ROOT\DesktopBackground\Shell

    or

    Computer\HKEY_CLASSES_ROOT\Directory\Background\shell

    If you leave out SubCommands, cascading flyouts won't work.
      My Computer


  6. Posts : 7,607
    Windows 10 Home 20H2
       #6

    Edwin said:
    Computer\HKEY_CLASSES_ROOT\DesktopBackground\Shell
    I already added this: [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Testing1]
    The command works.

    Edwin said:
    cascading flyouts
    What are cascading flyouts?
      My Computer


  7. Posts : 17,838
    Windows 10
       #7

    Matthew Wai said:
    I already added this: [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Testing1]
    The command works.


    What are cascading flyouts?
    Adapting .REG Files.-003480.png
      My Computer


  8. Posts : 7,607
    Windows 10 Home 20H2
       #8

    My context menu has no "System Properties". I don't know where/what it is.
      My Computer


  9. Posts : 17,838
    Windows 10
       #9

    Matthew Wai said:
    My context menu has no "System Properties". I don't know where/what it is.
    It's a custom one...


    Code:
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties]
    "Icon"="%windir%\\system32\\systempropertiesperformance.exe"
    "Position"="Bottom"
    "SubCommands"=""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell]
    @="\"C:\\Windows\\System32\\SystemPropertiesPerformance.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\001flyout]
    @="Advanced System Properties"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesAdvanced.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\001flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesAdvanced.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\002flyout]
    @="Performance-Visual Effects"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesPerformance.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\002flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesPerformance.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\003flyout]
    @="Computer Name"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesComputerName.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\003flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesComputerName.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\004flyout]
    @="Hardware"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesHardware.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\004flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesHardware.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\005flyout]
    @="System Protection"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesProtection.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\005flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesProtection.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\006flyout]
    @="Remote Assistance"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesRemote.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\006flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesRemote.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\007flyout]
    @="Data Execution Prevention"
    "Icon"="\"C:\\Windows\\System32\\SystemPropertiesDataExecutionPrevention.exe\""
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\ System Properties\shell\007flyout\command]
    @="\"C:\\Windows\\System32\\SystemPropertiesDataExecutionPrevention.exe\""
      My Computer


  10. Posts : 17,838
    Windows 10
       #10

    Another trick with positioning, over and above the default alpha-numerical order, is to add a blank entry to the beginning of the name (Alt255),

    Blank spaces to put the entry further down in the hierarchy...

    Adapting .REG Files.-003481.png
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:52.
Find Us




Windows 10 Forums