JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser .
Solved Recursively take ownership of reg key trees in powershell
Well-known member
Member
VIP
i was googling trying to find how to recursively take ownership of reg key trees and couldnt seem to find a solid answer, or one that would work with the script im making.
im trying to disable all sound enhancements via registry but the reg key trees require permissions and ownership privileges. this is what i have so far
Windows 11 Scripts. Contribute to shoober420/windows11-scripts development by creating an account on GitHub.
github.com
the issue is the reg key is variable (sound card mmdevapi guid) so i have to take ownership of the main reg key and have it act recursively. does anyone know how this can be done while being compatible with the script i have so far?
Windows 11 27965 Intel i7 7700 @4.0ghz 64gb DDR4 Radeon RX 5500 XT OSWindows 11 27965 Computer typePC/Desktop CPUIntel i7 7700 @4.0ghz Memory64gb DDR4 Graphics Card(s)Radeon RX 5500 XT Sound CardTopping D50s
Endeavor to Persevere
Guru
VIP
You can right click on a key then select permissions . It really is not that good to full around with The Registry.
Windows11 Pro 26300.9711 Intel Core i9 14900F (24 -Core, 68 MB Total C... 32GB DDR5 RTX 4080 Super w/581.94
OSWindows11 Pro 26300.9711 Computer typePC/Desktop Manufacturer/ModelDell Alienware Aurora R16 CPUIntel Core i9 14900F (24 -Core, 68 MB Total Cache) MotherboardDell Alienware Memory32GB DDR5 Graphics Card(s)RTX 4080 Super w/581.94 Sound CardRealtec Monitor(s) DisplaysCorsair XENEON 32QHD165 Screen Resolution2560 X 1440 Hard Drives1-2TB Samsung 990 Pro PCIe NVMe M2 SSD
1-4TB Samsung 990 Pro PCIe NVMe M2 SSD PSU1000 Watt Platinum Dell CaseAlienware CoolingLiquid Closed Loop KeyboardCorsair Strafe RGB MouseLogitech MK270 Wireless Internet Speed100Gb's Down-20 Up BrowserFirefox 158.0 AntivirusDefender Other InfoVery Quiet And Fast
CyberPower UPS CP1500PFCLCD
MX-Linux 13th Gen Inter(R) Core(TM) i3-1315U 64 GB DDR4 @3200 MHz. Internal
Operating SystemMX-Linux Computer typePC/Desktop Manufacturer/ModelIntel CPU13th Gen Inter(R) Core(TM) i3-1315U MotherboardIntel Memory64 GB DDR4 @3200 MHz. Graphics card(s)Internal Sound CardNone Monitor(s) DisplaysDell 2419HGCF Screen Resolution1920 X 1080 Hard DrivesSAMSUNG 980 PRO SSD 2TB, PCIe 4.0 M.2 2280 PSUChicony 30 Watt CaseSmall KeyboardDell MouseRazor Internet Speed1GB BrowserSlimjet
Forum Nitwit
Power User
VIP
I would not do this... But hey, that's me.
Win 11 Pro 25H2 Intel i7 13700KF 32 GB Team Group DDR5 - 6000 CL 30 ASUS TUF GAMING RTX 3070 Ti
OSWin 11 Pro 25H2 Computer typePC/Desktop Manufacturer/ModelSelf build CPUIntel i7 13700KF MotherboardGigabyte Z790 UD AC Memory32 GB Team Group DDR5 - 6000 CL 30 Graphics Card(s)ASUS TUF GAMING RTX 3070 Ti Sound CardOn board Realtek Monitor(s) DisplaysACER 34 inch Screen ResolutionNot 4K like I thought. 35" wide though. Hard Drives1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA PSUEVGA 1000Q CaseRosewill something or other CoolingNoctua NH-D15. A whole schwak of Noctua case fans. $$$ KeyboardLogitech G815 MouseLogitech G502 Hero Internet Speed700 up, 600 down BrowserFirefox AntivirusMalwareBytes
Widows 11 Pro Ryzen 2700X 32 GB DDR4 XFX Radeon R9 280
Operating SystemWidows 11 Pro Computer typePC/Desktop Manufacturer/ModelSelf build CPURyzen 2700X MotherboardMSI X470 Gaming Plus Max Memory32 GB DDR4 Graphics card(s)XFX Radeon R9 280 Sound CardOnboard Monitor(s) DisplaysTwo 27 inch Acer monitors Screen Resolution1920 x 1080 Hard DrivesOne 1 TB NVME (Samsung) PSUCorsair 750 Watt CaseHAF 912 CoolingWraith cooler and case fans KeyboardLogitech G710+ MouseGeneric Internet Speed700 down, 650 up BrowserFirefox, Chrome AntivirusMalware bytes
Well-known member
Guru
VIP
I would suggest Helge Klein's trusted tool SetACL.exe.
You don't want to be owner of these keys, but rather be granted FULL permission.
Managing Registry Permissions with SetACL.exe
Download
Code:
setacl.exe -on "HKLM\SOFTWARE\<KEY>" -ot reg -rec yes -actn ace -ace "n:<USER>;p:full"
Well-known member
Power User
VIP
Changing permissions in the registry are only for experienced users, and not the faint of heart.
Be sure to backup the registr y and make a Backup image of your computer before you go monkeying around in the Registry.
Windows 11 Pro Insider 64 bit 25H2 26200.5742 Intel Core i7 9700K 3.60 16 GB nVidia GEForce RTX 2060 Super OSWindows 11 Pro Insider 64 bit 25H2 26200.5742 Computer typePC/Desktop Manufacturer/ModelGigabyte Z390 UD CPUIntel Core i7 9700K 3.60 MotherboardGigabyte Z390 UD Memory16 GB Graphics Card(s)nVidia GEForce RTX 2060 Super Sound Cardonboard Monitor(s) DisplaysTwo 27" Dell 4K monitors Screen Resolution3840 x 2160 Hard DrivesM.2 NVME SSD, 500 GB; Two 2TB Mechanical HDD's PSU850w PSU CaseCyberpower PC CoolingWater cooled KeyboardBacklit Cyberpower gaming keyboard MouseBacklit Cyberpower gaming mouse Internet Speed1 GB mbps BrowserBrave AntivirusWindows Security
Rancho Seldom Siesta
Power User
VIP
Changing permissions in the registry are only for experienced users, and not the faint of heart.
Amen...
Windows 11 Pro 26H2 26300.9711 Intel® Core™ Ultra 7 265 1.8GHz to 5.3GHz (Ar... SK Hynix 32GB DDR5 5600 Desktop RAM UDIMM Non... Dell NVIDIA® GeForce RTX™ 4060 8GB GDDR6 & (i...
OSWindows 11 Pro 26H2 26300.9711 Computer typePC/Desktop Manufacturer/ModelDell Tower Plus EBT2250, DOB: 06/15/2025 CPUIntel® Core™ Ultra 7 265 1.8GHz to 5.3GHz (Arrow Lake) MotherboardDell Inc. 02D3NT A00 (U3E1) MemorySK Hynix 32GB DDR5 5600 Desktop RAM UDIMM Non-ECC PC5-5600B Graphics Card(s)Dell NVIDIA® GeForce RTX™ 4060 8GB GDDR6 & (iGPU) Integrated Intel® UHD Graphics Sound CardChipset Realtek High-Definition Audio with Dolby Atmos Monitor(s) DisplaysDell Ultra Sharp U2515H 25-Inch Screen LED-Lit Screen Resolution2560 X 1440 Hard DrivesSamsung (NVMe PM9C1a 1024GB) M.2 PCIe NVMe Solid State Drive (OS), with Samsung Piccolo (S4LY022) 6-Core 4 Channel Controller.
Samsung T7 500GB SSD, USB-C External Drive PSUDell 460W CaseDell Tower Plus EBT 2250 CoolingFan KeyboardDell Wired Keyboard - KB216 MouseLogitech M510 Internet SpeedIntel Killer E3100G 2.5 Gigabit Ethernet Controller BrowserMicrosoft Edge AntivirusMicrosoft Windows Security
Windows 11 Pro 26H2 26300.9711 10th Generation Intel Core i7-10510U Processo... 16GB DDR4 RAM NVIDIA® GeForce® MX250 with 2GB GDDR5 graphic...
Operating SystemWindows 11 Pro 26H2 26300.9711 Computer typeLaptop Manufacturer/ModelDell Inspiron 15 7000 (7591) 2-in-1, DOB: 11/30/2019 CPU10th Generation Intel Core i7-10510U Processor (8MB Cache, up to 4.9 GHz) Comet Lake MotherboardDell 0NNW5N Memory16GB DDR4 RAM Graphics card(s)NVIDIA® GeForce® MX250 with 2GB GDDR5 graphics memory Sound CardChipset Realtek ALC3254 Monitor(s) DisplaysDell 15.6-inch UHD Truelife Touch Narrow Border WVA Display with Active Pen support Screen Resolution3840 x 2160 Hard DrivesIntel NVME 512GB SSD with 32GB Intel Optane Memory, M.2 80mm PCIe 3.0 RAID
SanDisk 256GB Extreme microSDXC UHS-I Memory Card PSUDell 4-Cell Battery, 68 Whr (Integrated), 90 Watt AC Adapter CaseDell Inspiron 15 7000 2-in-1 (7591) CoolingStandard Dell Case Fan & Havit HV-F2056 USB Powered (3 Fans) Laptop Cooling Pad. KeyboardDell MouseLogitech Wireless Mouse M650L Internet SpeedWireless/Wired connectivity (WiFi 6 - 802.11 ax) BrowserMicrosoft Edge AntivirusMicrosoft Windows Security
Well-known member
Guru
VIP
Another solution is to use PowerRun or another TrustedInstaller-based tool to get temporary elevated rights.
Some keys like for Defender will be protected by Tamper Protection, or locked by a running process. When that process isn't running, those keys are unlocked. The law of unintended consequences should lead you to make the least impactful change to get something done.
Otherwise your method of change might come back to bite you.
Well-known member
Pro User
VIP
RegEdit as TrustedInstaller is one of the options in my RightClickTools package. As
@garlin mentioned, this is a safer approach than changing registry permissions.
Add a Set of Powerful Tools to the Windows Explorer Context Menu
lesferch.github.io
Last edited: Sep 2, 2025
OSWindows 10/11 Computer typeLaptop Manufacturer/ModelAcer
Well-known member
Member
VIP
Thread Starter
i decided to go with the SetACL route. i ironically already have a script to grant permissions of many reg keys that are protected by windows
Windows 11 Scripts. Contribute to shoober420/windows11-scripts development by creating an account on GitHub.
github.com
Windows 11 27965 Intel i7 7700 @4.0ghz 64gb DDR4 Radeon RX 5500 XT OSWindows 11 27965 Computer typePC/Desktop CPUIntel i7 7700 @4.0ghz Memory64gb DDR4 Graphics Card(s)Radeon RX 5500 XT Sound CardTopping D50s