For just (REG_SZ) String Value(s) it's simple.
1) Through Command Prompt:
REG /?
REG [QUERY|ADD|DELETE|COPY|SAVE|RESTORE|LOAD|UNLOAD|COMPARE|EXPORT|IMPORT|FLAGS] /?
> reg add /?
REG ADD [HK...\path\to\KeyName] [/v ValueName | /ve (EmptyValueName)(Default)]
[/t DataType] [/s (Separator)] [/d DataValue] [/f (Force overwriting)]
. . .
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 5000
(i) Could be added also to a .cmd/.bat file, to including multi line commands or use & or && between the commands in only one string at Command Prompt.
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 5000 & REG ADD "HKEY_CURRENT_USER\Console" /v ScreenColors /t REG_DWORD /d 0x0000000f /f
Note the /f switch at the end of every reg add command. If not exist, you will questioned about overwriting. Value WaitToKillServiceTimeout exists, overwrite(Yes/No)?
_ _ _ _ _ _ _ _
2) Through .reg file:
This way is much more convenient if you want to add/edit a lot of values and/or also many keys.
In a .reg file add as the following:
Windows Registry Editor Version 5.00
;this will change the waiting time to 5 seconds before Windows kill not responding programs.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="5000"
Windows Registry Editor Version 5.00
; This will CREATE a sub Key named 'Example' under the 'Control' Key.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Example]
"A-Reg-D_Word-ValueName"="SomeValueData"
; and this will DELETE the entire 'Example' Key and its contents.
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Example]
You can also export a KeyName (from RegEdit.exe using R.Click, or from CMD using REG EXPORT /?) to a .reg file, back it up, or/and modify it and run it.
(i) Always leave empty line after the (mandatory to be the 1st) 'version line' in a .reg file.
Windows Registry Editor Version 5.00
;modified
;here exist only the default console colors
;some other values excluded
[HKEY_CURRENT_USER\Console]
"ScreenColors"=dword:0000000f
"PopupColors"=dword:000000f0
"ColorTable00"=dword:00000000
"ColorTable01"=dword:00800000
"ColorTable02"=dword:00008000
"ColorTable03"=dword:00808000
"ColorTable04"=dword:00000080
"ColorTable05"=dword:00800080
"ColorTable06"=dword:00008080
"ColorTable07"=dword:00c0c0c0
"ColorTable08"=dword:00808080
"ColorTable09"=dword:00ff0000
"ColorTable10"=dword:0000ff00
"ColorTable11"=dword:00ffff00
"ColorTable12"=dword:000000ff
"ColorTable13"=dword:00ff00ff
"ColorTable14"=dword:0000ffff
"ColorTable15"=dword:00ffffff
for example, if you run the above .reg file it will overwrite only the included values, and anything else in the already existed RegEdit.exe[HKEY_CURRENT_USER\Console] will stay untouched.
You can also add different Keys\subKeys, DataTypes and its values at the same .reg file.
Windows Registry Editor Version 5.00
; ::::::::::::::::::: by adonios77 :::: (supports Windows 7) :::::::::::::::::::
; R.Click + Shift to show - Context Menus ("Extended"="")
; attributes - file & directory
; inherited permissions - file & directory
; ownership permissions - file & directory & drive
; Kill All Not Responding Tasks - DesktopBackground
; ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;ATTRIBUTES - file =============================================================
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\Attributes]
"MUIVerb"="Attributes (r,a,s,h,i)"
"SubCommands"=""
"Extended"=""
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell]
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\aShow]
"MUIVerb"="Show current attributes"
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\aShow\Command]
@="cmd.exe /k attrib \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\bReset]
"MUIVerb"="Reset attributes (Remove)"
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\bReset\Command]
@="cmd.exe /k attrib -r -a -s -h -i \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\cReadOnlySet]
"MUIVerb"="Set Read-only attribute"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\cReadOnlySet\Command]
@="attrib +r \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\dReadOnlyRemove]
"MUIVerb"="Remove Read-only attribute"
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\dReadOnlyRemove\Command]
@="attrib -r \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\eHiddenSet]
"MUIVerb"="Set Hidden attribute"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\eHiddenSet\Command]
@="attrib +h \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\fHiddenRemove]
"MUIVerb"="Remove Hidden attribute"
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\fHiddenRemove\Command]
@="attrib -h \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\gSystemSet]
"MUIVerb"="Set System attribute"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\gSystemSet\Command]
@="attrib +s \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\hSystemRemove]
"MUIVerb"="Remove System attribute"
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\hSystemRemove\Command]
@="attrib -s \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\iArchiveSet]
"MUIVerb"="Remove Archive attribute"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\*\shell\Attributes\shell\iArchiveSet\Command]
@="attrib -a \"%1\""
; ATTRIBUTES - directory -------------------------------------------------------
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes]
"MUIVerb"="Attributes (r,a,s,h,i)"
"SubCommands"=""
"Extended"=""
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\aShow]
"MUIVerb"="Show current attributes"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\aShow\command]
@="cmd.exe /k attrib \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\bShow]
"MUIVerb"="Show attributes of this folder, subfolders and files"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\bShow\command]
@="cmd.exe /k attrib \"%1\" & attrib \"%1\\*.*\" /s /d"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\cReset]
"MUIVerb"="Reset attributes"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\cReset\command]
@="cmd.exe /c attrib -r -a -s -h -i \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\dReset]
"MUIVerb"="Reset attributes for this folder, subfolders and files"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\dReset\command]
@="cmd.exe /c attrib -r -a -s -h -i \"%1\" & attrib -r -a -s -h -i \"%1\\*.*\" /s /d"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\eReadOnlySet]
"CommandFlags"=dword:00000020
"MUIVerb"="Set Read-only attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\eReadOnlySet\command]
@="cmd.exe /c attrib +r \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\fReadOnlySet]
"MUIVerb"="Set Read-only attribute to this folder, subfolders and files"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\fReadOnlySet\command]
@="cmd.exe /c attrib +r \"%1\" & attrib +r \"%1\\*.*\" /s"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\gReadOnlyRemove]
"MUIVerb"="Remove Read-only attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\gReadOnlyRemove\command]
@="cmd.exe /c attrib -r \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\hReadOnlyRemove]
"MUIVerb"="Remove Read-only attribute from this folder and subfiles"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\hReadOnlyRemove\command]
@="cmd.exe /c attrib -r \"%1\" & attrib -r \"%1\\*.*\" /s"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\iHiddenSet]
"CommandFlags"=dword:00000020
"MUIVerb"="Set Hidden attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\iHiddenSet\command]
@="cmd.exe /c attrib +h \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\jHiddenSet]
"MUIVerb"="Set Hidden attribute to this folder, subfolders and files"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\jHiddenSet\command]
@="cmd.exe /c attrib +h \"%1\" & attrib +h \"%1\\*.*\" /s /d"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\kHiddenRemove]
"MUIVerb"="Remove Hidden attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\kHiddenRemove\command]
@="cmd.exe /c attrib -h \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\lHiddenRemove]
"MUIVerb"="Remove Hidden attribute from this folder, subfolders and files"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\lHiddenRemove\command]
@="cmd.exe /c attrib -h \"%1\" & attrib -h \"%1\\*.*\" /s /d"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\mSystemSet]
"CommandFlags"=dword:00000020
"MUIVerb"="Set System attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\mSystemSet\command]
@="cmd.exe /c attrib +s \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\oSystemRemove]
"MUIVerb"="Remove System attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\oSystemRemove\command]
@="cmd.exe /c attrib -h \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\qArchiveSet]
"CommandFlags"=dword:00000020
"MUIVerb"="Set Archive attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\qArchiveSet\command]
@="cmd.exe /c attrib +a \"%1\""
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\sArchiveRemove]
"MUIVerb"="Remove Archive attribute"
[HKEY_CLASSES_ROOT\Directory\Shell\Attributes\Shell\sArchiveRemove\command]
@="cmd.exe /c attrib -a \"%1\""
;INHERITED PERMISSIONS - File ==================================================
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions]
"MUIVerb"="Inherited Permissions"
"HasLUAShield"=""
"NoWorkingDirectory"=""
"SubCommands"=""
"Extended"=""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell]
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\01EnableInheritance]
"MUIVerb"="Enable inheritance"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\01EnableInheritance\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:e & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\02DisableConvert]
"MUIVerb"="Disable inheritance and convert into explicit permissions"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\02DisableConvert\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:d & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\03DisableRemove]
"MUIVerb"="Disable inheritance and remove"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\InheritedPermissions\shell\03DisableRemove\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:r & pause' -Verb runAs\""
; INHERITED PERMISSIONS - Directory --------------------------------------------
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions]
"MUIVerb"="Inherited Permissions"
"HasLUAShield"=""
"NoWorkingDirectory"=""
"SubCommands"=""
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\01EnableInheritance]
"MUIVerb"="Enable inheritance"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\01EnableInheritance\command]
@="powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:e & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\02DisableConvert]
"MUIVerb"="Disable inheritance and convert into explicit permissions"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\02DisableConvert\command]
@="powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:d & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\03DisableRemove]
"MUIVerb"="Disable inheritance and remove"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions\shell\03DisableRemove\command]
@="powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /inheritance:r & pause' -Verb runAs\""
; OWNERSHIP PERMISSIONS - files ================================================
[HKEY_CLASSES_ROOT\*\shell\Ownership]
"Extended"=""
"HasLUAShield"=""
"MUIVerb"="Ownership"
"SubCommands"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell]
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\01View_Owner]
"MUIVerb"="See current owner"
"Icon"="imageres.dll,-1029"
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\01View_Owner\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit Get-ACL '%1'| Format-List -Property Owner"
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\02Set_Administrators]
"MUIVerb"="Change to Administrators"
"HasLUAShield"=""
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\02Set_Administrators\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Administrators\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Administrators\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\03Set_Everyone]
"MUIVerb"="Change to Everyone"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\03Set_Everyone\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Everyone\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Everyone\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\04Set_SYSTEM]
@="Change to SYSTEM"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\04Set_SYSTEM\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"SYSTEM\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"SYSTEM\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\05Set_TrustedInstaller]
"MUIVerb"="Change to TrustedInstaller"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\05Set_TrustedInstaller\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\06TakeOwnership]
@="Take Ownership (bypass)"
"HasLUAShield"=""
"NeverDefault"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\06TakeOwnership\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /c /l & pause' -Verb runAs\""
; OWNERSHIP PERMISSIONS RESET NTFS
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\07ResetNTFSPermissions]
"MUIVerb"="Reset Permissions (NTFS)"
"CommandFlags"=dword:00000020
"HasLUAShield"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\Ownership\shell\07ResetNTFSPermissions\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd.exe -ArgumentList '/c icacls \\\"%1\\\" /reset & pause' -Verb RunAs\""
;-???---------------------------------------------------------------------------
[HKEY_CLASSES_ROOT\*\shell\removeproperties]
"ProgrammaticAccessOnly"="Apartment"
[HKEY_CLASSES_ROOT\*\shell\removeproperties\DropTarget]
"CLSID"="{09a28848-0e97-4cef-b950-cea037161155}"
; OWNERSHIP PERMISSIONS - directory --------------------------------------------
[HKEY_CLASSES_ROOT\Directory\shell\Ownership]
"MUIVerb"="Ownership"
"AppliesTo"="NOT (System.ItemPathDisplay:=\"C:\\Users\" OR System.ItemPathDisplay:=\"C:\\ProgramData\" OR System.ItemPathDisplay:=\"C:\\Windows\" OR System.ItemPathDisplay:=\"C:\\Windows\\System32\" OR System.ItemPathDisplay:=\"C:\\Program Files\" OR System.ItemPathDisplay:=\"C:\\Program Files (x86)\")"
"Extended"=""
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"
"SubCommands"=""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\01View_Owner]
@="See current owner"
"Icon"="imageres.dll,-1029"
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\01View_Owner\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit Get-ACL '%1'| Format-List -Property Owner"
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\02Set_Administrators]
@="Change to Administrators"
"HasLUAShield"=""
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\02Set_Administrators\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Administrators\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Administrators\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\03Set_Everyone]
@="Change to Everyone"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\03Set_Everyone\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Everyone\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"Everyone\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\04Set_SYSTEM]
@="Change to SYSTEM"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\04Set_SYSTEM\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"SYSTEM\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"SYSTEM\" /t /c /l & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\05Set_TrustedInstaller]
@="Change to TrustedInstaller"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\05Set_TrustedInstaller\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /t /c /l & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \\\"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /t /c /l & pause' -Verb runAs\""
; OWNERSHIP PERMISSIONS RESET NTFS
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\06ResetNTFSPermissions]
"MUIVerb"="Reset Permissions (NTFS)"
"CommandFlags"=dword:00000020
"HasLUAShield"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\Ownership\shell\06ResetNTFSPermissions\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd.exe -ArgumentList '/c icacls \\\"%1\\\" /reset & pause' -Verb RunAs\""
; OWNERSHIP PERMISSIONS - drive ------------------------------------------------
[HKEY_CLASSES_ROOT\Drive\shell\Ownership]
"MUIVerb"="Change Owner"
"AppliesTo"="NOT (System.ItemPathDisplay:=\"C:\\\")"
"Extended"=""
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"
"SubCommands"=""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\01View_Owner]
@="See current owner"
"Icon"="imageres.dll,-1029"
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\01View_Owner\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit Get-ACL '%1'| Format-List -Property Owner"
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\02Set_Administrators]
@="Change to Administrators"
"HasLUAShield"=""
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\02Set_Administrators\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"Administrators\" /c & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"Administrators\" /c & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\03Set_Everyone]
@="Change to Everyone"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\03Set_Everyone\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/k icacls \"%1\\\" /setowner \"Everyone\" /c & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/k icacls \"%1\\\" /setowner \"Everyone\" /c & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\04Set_SYSTEM]
@="Change to SYSTEM"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\04Set_SYSTEM\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"SYSTEM\" /c & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"SYSTEM\" /c & pause' -Verb runAs\""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\04Set_TrustedInstaller]
@="Change to TrustedInstaller"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\04Set_TrustedInstaller\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /c & pause' -Verb runAs\""
"IsolatedCommand"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c icacls \"%1\\\" /setowner \"\"\"NT Service\\TrustedInstaller\"\"\" /c & pause' -Verb runAs\""
; OWNERSHIP PERMISSIONS RESET NTFS
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\05ResetNTFSPermissions]
"MUIVerb"="Reset Permissions (NTFS)"
"CommandFlags"=dword:00000020
"HasLUAShield"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\Ownership\shell\05ResetNTFSPermissions\Command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -windowstyle hidden -command \"Start-Process cmd.exe -ArgumentList '/c icacls \\\"%1\\\" /reset & pause' -Verb RunAs\""
; Kill All Not Responding Tasks - DesktopBackground ============================
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\KillNotResponding]
"icon"="taskmgr.exe,-30651"
"MUIverb"="Kill not responding tasks"
"Position"="Top"
[HKEY_CLASSES_ROOT\DesktopBackground\shell\KillNotResponding\Command]
@="cmd.exe /K tasklist.exe /FI \"STATUS eq NOT RESPONDING\" & taskkill.exe /F /FI \"STATUS eq NOT RESPONDING\" && timeout /T 4 && exit || @echo.———————————&echo.Trying with elevated permissions && powershell Start-Process -wait \"cmd.exe\" -verb runAs -ArgumentList \"'/C taskkill /F /FI \\\"STATUS eq NOT RESPONDING\\\" & timeout /T 4\"' && exit"

To remove it run the following:
Windows Registry Editor Version 5.00
; :::::::::::::::::::: by adonios77 (supports Windows 7) ::::::::::::::::::::
; R.Click + Shift to show menus ("Extended"="")
; Includes:
; attributes - file & directory
; inherited permissions - file & directory
; ownership - permissions - file & directory & drive
; ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;ATTRIBUTES - file =============================================================
[-HKEY_CLASSES_ROOT\*\shell\Attributes]
; ATTRIBUTES - directory --------------------------------------------------------
[-HKEY_CLASSES_ROOT\Directory\Shell\Attributes]
;INHERITED PERMISSIONS - File ==================================================
[-HKEY_CLASSES_ROOT\*\shell\InheritedPermissions]
; INHERITED PERMISSIONS - Directory --------------------------------------------
[-HKEY_CLASSES_ROOT\Directory\shell\InheritedPermissions]
; OWNERSHIP PERMISSIONS - files ================================================
[-HKEY_CLASSES_ROOT\*\shell\Ownership]
;-???---------------------------------------------------------------------------
[-HKEY_CLASSES_ROOT\*\shell\removeproperties]
[-HKEY_CLASSES_ROOT\*\shell\removeproperties\DropTarget]
; OWNERSHIP PERMISSIONS - directory --------------------------------------------
[-HKEY_CLASSES_ROOT\Directory\shell\Ownership]
; OWNERSHIP PERMISSIONS - drive ------------------------------------------------
[-HKEY_CLASSES_ROOT\Drive\shell\Ownership]
; Kill All Not Responding Tasks - DesktopBackground ============================
[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\KillNotResponding]
I have collected various tweaks - modifications about context-menus from 'winaero.com' and amended them and incorporated into the .reg file above, as example to the question.
Take a look here: winaero.com/add-inherited-permissions-context-menu-windows-10/
To create a "REG_MULTI_SZ" or "REG_EXPAND_SZ" you must mess with HEX...