I'm preparing a batch script that should help me to remove 3 keys from the registry. Unfortunately nobody has permission to edit the keys, except for TrustedInstaller.
To execute my reg file that removes the 3 keys successfully my batch script will call REGINI and try to set the permission to 'full access to everyone'. However, running my script as admin will not being any success.
Here are the contents of my files:
script.bat
@SETLOCAL ENABLEDELAYEDEXPANSION && @SETLOCAL ENABLEEXTENSIONS && @CD /D %~dp0 && TITLE %~f0
REGINI _dlmw.rpf
_dlmw.reg
_dlmw.rpf
\Registry\Machine\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{45DE1EA9-10BC-4f96-9B21-4B6B83DBF476} [7]
\Registry\Machine\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{5EE64AFB-398D-4edb-AF71-3B830219ABF7} [7]
\Registry\Machine\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{C0F51D84-11B9-4e74-B083-99F11BA2DB0A} [7]
_dlmw.reg
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{45DE1EA9-10BC-4f96-9B21-4B6B83DBF476}]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{5EE64AFB-398D-4edb-AF71-3B830219ABF7}]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\{C0F51D84-11B9-4e74-B083-99F11BA2DB0A}]
Actually, when running the reg file, there are no permissions set for everybody. Accoding to http://support.microsoft.com/kb/245031 this should actually work.
All files are in the same directory, REGINI command does not return any messages.
What do I do wrong?
EDIT
Now I understood I cannot change the permissions, because I'm not the owner of the keys. Without installing something extra would suit my situation better IMHO.
regini
tool can't change the registry key owner; you should be usingsubinacl
. Anyway, what's the reason you're trying to suppress the "low on memory" warnings?