Adapting .REG Files.

Page 3 of 13 FirstFirst 12345 ... LastLast

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

    Hello FreeBooter,
    FreeBooter said:
    Thanks, i have created batch script for this context menu.
    I know exactly what I want so I might try and create a Batch Script [using your script as a basis], to include ALL the items I want.

    With mine though, I would like them to pretty much show on ALL aspects of the Context Menu like Desktop, Folder, Drive etc.

    As Edwin has pointed out, if I put the entries in either Computer\HKEY_CLASSES_ROOT\DesktopBackground\Shell or Computer\HKEY_CLASSES_ROOT\Directory\Background\shell,
    then they should appear in ALL the Context Menus.

    Thanks in advance.
      My Computer


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

    Hello KeithM, thanks for the detailed explanation.

    KeithM said:
    If MUIVerb is deleted, DefalutText is used:
    Do you mean is NOT detected?

    Thanks in advance.
      My Computer


  3. Posts : 989
    Microsoft Windows 10 Home
       #23

    No, because I started with it existing (per the reg file), and the ten deleted it for testing. so I meant deleted. But obvously, once deleted, it can't be detected either. It was meant to be an interactive learning exercise.
      My Computer


  4. Posts : 17,838
    Windows 10
       #24

    Paul Black said:
    ......I would like them to pretty much show on ALL aspects of the Context Menu like Desktop, Folder, Drive etc.
    I still don't get what you're trying to do.
      My Computer


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

    Hello Edwin,

    Edwin said:
    I still don't get what you're trying to do.
    What I would like is to have everything I need available via the different Context Menus [i.e. Desktop, Folder, Drive etc].

    I have since downloaded a third-party context menu program, but when I look at the Registry, it has the software name included in the command, this is not what I want because I want to be able to uninstall the software and still have the Context Menu items available!

    As an example, here is what the Registry shows after adding a System Tools menu using their software . . .
    Code:
    Z001AAA
    Default - value not set
    Icon= %SystemRoot&\system32\cmd.exe
    MUIVerb - Open Command Prompt Here
    NoWorkingDirectory
    
    command
    "%ProgramFiles%\Easy Context Menu\EcMenu.exe" /RunAdmin "%SystemRoot%\system32\cmd.exe" /s /k pushd "%V"
    
    System Tools
    
    All Tasks
    Computer Management
    Control Panel
    Device Managermsconfig
    Programs and Features
    Registry Editor
    Run
    ServicesSnipping Tool
    Task Manager
    
    Computer\HKEY_CLASSES_ROOT\Directory\shell\Z001AAA
    
    Z001AAA
    Default - value not set
    Extended
    MUIVerb - Open Command Prompt Here
    NoWorkingDirectory
    
    command
    "%ProgramFiles%\Easy Context Menu\EcMenu.exe" /RunAdmin "%SystemRoot%\system32\cmd.exe" /s /k pushd "%L"
    . . . and . . .
    Code:
    Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\Z016AAE
    
    Z016AAE
    Default - value not set
    Icon= %ProgramFiles%\Easy Context Menu\EcMenu.exe,14
    MUIVerb - Turn Off Options
    SubCommands - 
    
    shell - Default - value not set
    
    Z017ADC
    Default - value not set
    Icon= %ProgramFiles%\Easy Context Menu\EcMenu.exe,16
    MUIVerb - Switch User
    
    command
    Default = "%ProgramFiles%\Easy Context Menu\EcMenu.exe" /Shutdown /US
    
    Z018ADC
    Default - value not set
    Icon= %ProgramFiles%\Easy Context Menu\EcMenu.exe,17
    MUIVerb - Log Off
    
    command
    "%ProgramFiles%\Easy Context Menu\EcMenu.exe" /Shutdown /L
    
    etc
    etc
    etc
    I don't really know how to change the Registry to ignore the software so I can uninstall it and still have the items available!
      My Computer


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

    Hello FreeBooter,

    You posted a Batch Script earlier in the thread and I thought that it might be easier to go down that route.
    Can you please have a quick look at the code below to see if there is anything jumping out at you before I implement it over the weekend. I have obviously only included the specific items and not the rest of the code.

    I would like this to appear in the Desktop, Folder, and Drive Context Menus . . .

    Code:
    Reg.exe add "HKCR\DesktopBackground\Shell\SystemTools" /v "MUIVerb" /t REG_SZ /d "System Tools" /f
    Reg.exe add "HKCR\DesktopBackground\Shell\SystemTools" /v "SubCommands" /t REG_SZ /d "AllTasks;ComputerManagement;ControlPanel;DeviceManager;LocalGroupPolicyEditor;LocalSecurityPolicy;MSConfig;ProgramsAndFeatures;RegistryEditor;Run;Services;SnippingTool;TaskManager" /f
    Reg.exe add "HKCR\DesktopBackground\Shell\SystemTools" /v "icon" /t REG_SZ /d "imageres.dll,104" /f
    Reg.exe add "HKCR\DesktopBackground\Shell\SystemTools" /v "Position" /t REG_SZ /d "Bottom" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AllTasks" /ve /t REG_SZ /d "All Tasks" /f > Nul
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AllTasks" /v "Icon" /t REG_SZ /d "control.exe" /f > Nul
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AllTasks\command" /ve /t REG_SZ /d "explorer shell:::{ED7BA470-8E54-465E-825C-99712043E01C}" /f > Nul
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement" /ve /t REG_SZ /d "Computer Management" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement" /v "icon" /t REG_SZ /d "compmgmt.msc" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement\command" /ve /t REG_SZ /d "compmgmt.msc" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel" /ve /t REG_SZ /d "Control Panel" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel" /v "icon" /t REG_SZ /d "control.exe" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel\command" /ve /t REG_SZ /d "control.exe" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DeviceManager" /ve /t REG_SZ /d "Device Manager" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DeviceManager" /v "Icon" /t REG_EXPAND_SZ /d "devmgr.dll" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DeviceManager\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mmc.exe /s %%SystemRoot%%\system32\devmgmt.msc" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalGroupPolicyEditor" /ve /t REG_SZ /d "Local Group Policy Editor" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalGroupPolicyEditor" /v "icon" /t REG_SZ /d "gpedit.dll" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalGroupPolicyEditor\command" /ve /t REG_SZ /d "mmc.exe /s gpedit.msc" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalSecurityPolicy" /ve /t REG_SZ /d "Local Security Policy" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalSecurityPolicy" /v "icon" /t REG_SZ /d "wsecedit.dll" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\LocalSecurityPolicy\command" /ve /t REG_SZ /d "mmc.exe /s secpol.msc" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MSConfig" /ve /t REG_SZ /d "MSConfig" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MSConfig" /v "icon" /t REG_SZ /d "msconfig.exe" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MSConfig\command" /ve /t REG_SZ /d "msconfig.exe" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ProgramsAndFeatures" /ve /t REG_SZ /d "ProgramsAndFeatures" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ProgramsAndFeatures" /v "icon" /t REG_SZ /d "%SystemRoot%\System32\appwiz.cpl" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ProgramsAndFeatures\command" /ve /t REG_SZ /d "%SystemRoot%\System32\appwiz.cpl" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RegistryEditor" /ve /t REG_SZ /d "Registry Editor" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RegistryEditor" /v "icon" /t REG_SZ /d "regedit.exe" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RegistryEditor\command" /ve /t REG_SZ /d "regedit.exe" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run" /ve /t REG_SZ /d "Run" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run" /v "icon" /t REG_SZ /d "explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run\command" /ve /t REG_SZ /d "explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Services" /ve /t REG_SZ /d "Services" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Services" /v "icon" /t REG_SZ /d "filemgmt.dll" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Services\command" /ve /t REG_SZ /d "mmc.exe /s services.msc" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool" /ve /t REG_SZ /d "Snipping Tool" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool" /v "icon" /t REG_SZ /d "SnippingTool.exe" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool\command" /ve /t REG_SZ /d "SnippingTool.exe" /f
    
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskManager" /ve /t REG_SZ /d "Task Manager" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskManager" /v "icon" /t REG_SZ /d "taskmgr.exe" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskManager\command" /ve /t REG_SZ /d "taskmgr.exe" /f
    Thanks in advance.
      My Computer


  7. Posts : 5,330
    Windows 11 Pro 64-bit
       #27

    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement" /ve /t REG_SZ /d "Computer Management" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement" /v "icon" /t REG_SZ /d "Mycomput.dll,-204" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ComputerManagement\command" /ve /t REG_SZ /d "C:\Windows\system32\mmc.exe /s C:\Windows\system32\compmgmt.msc" /f
    Computer Management was not running so i change its path.
    Computer Management icon not displaying same goes for Run box.


    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run" /ve /t REG_SZ /d "Run" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run" /v "icon" /t REG_SZ /d "imageres.dll,-100" /f
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run\command" /ve /t REG_SZ /d "explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}" /f
      My Computer


  8. Posts : 989
    Microsoft Windows 10 Home
       #28

    I think you should bite the bullet & switch to PowerShell for registry manipulation. The Registry Provider in PowerShell lets you navigate & manipulate the Registry the same way you do the file system. Very intutive & very powerful.

    What FolderTypes have a templeate created by Apply to Folders?:
    Code:
    $Defaults = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'
    $FT      = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    
    (gi $defaults).Property | Select {$_}, {(gp "$FT\$_").CanonicalName}}
    
    (gi $defaults).Property | Select @{N = 'ID'; E = {$_}}, @{N = 'Name'; E = {(gp "$FT\$_").CanonicalName}}
    Fun Stuff!
      My Computer


  9. Posts : 989
    Microsoft Windows 10 Home
       #29

    Paul Black said:
    Hello Edwin,
    What I would like is to have everything I need available via the different Context Menus [i.e. Desktop, Folder, Drive etc].
    I have since downloaded a third-party context menu program, but when I look at the Registry, it has the software name included in the command, this is not what I want because I want to be able to uninstall the software and still have the Context Menu items available!
    Computer\HKEY_CLASSES_ROOT\Directory\shell\Z001AAA
    I don't really know how to change the Registry to ignore the software so I can uninstall it and still have the items available!
    What you should do is export:
    HKEY_CLASSES_ROOT\Directory\shell\Z001AAA
    Then do a search & replace in the reg file, replacing "Z001AAA" with "MyMenu". Saving & merging should create a duplicate memu without the softtware name.
    Once you have the menu you want for one type of ProgID, you can export it & use Search/Replace to create the reg ifles for other items:

    • *
    • AllFilesystemObjects
    • DesktopBackground
    • Directory
    • Directory\Background
    • Drive
    • Folder (includes virtual/non-FileSystem/NavigationPaneItems)
      My Computer


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

    Hello FreeBooter,

    Thanks for taking the time to look and amend the script.

    A couple of questions please!

    [1] What is the reason for putting the Keys etc in: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\?

    Can I also out them in: Computer\HKEY_CLASSES_ROOT\DesktopBackground\ and Computer\HKEY_CLASSES_ROOT\Directory\Background\?

    [2] I can't get the Programs and Features to work. I have tried several things including this . . .

    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ProgramsAndFeatures\command" /ve /t REG_SZ /d "control.exe /s %SystemRoot%\system32\appwiz.cpl" /f

    Am I going MAD!

    EDIT:

    Is there any reson for the double percentage sign here? . . .

    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DeviceManager\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mmc.exe /s %%SystemRoot%%\system32\devmgmt.msc" /f
      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 09:06.
Find Us




Windows 10 Forums