In microsoft.public.win2000.registry, wrote:
> Hi All,
>
> I can not get the following *.reg file to work because of a
> permission setting on the key (I can manually alter
> the key's and sub key's permissions to "everyone",
> then this will work.)
Generally avoid the EVERYONE group. <G>
> REGEDIT4
> [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
> Enum\Root\LEGACY_PAVAGENTE]
>
> What a pain.
Designed that way... :-\
> How do I change this key's and sub key's permissions
> with/from a script (batch file)? Is there a why to tell the
*.reg
> file to do it?
There is another approach and solution for this location, namely
DEVCON.EXE.
Running DEVCON requires Administrators authority but can bypass the
default permissions which restrict admins in this registry branch.
It acts as SYSTEM in this scenario.
I actually wrote a REXX script that accepts the "name"
("PAVAGENTE" in your example) and removes the key (under \root\ )
Here are your clues:
devcon findall =LegacyDriver
devcon find @ROOT\LEGACY_XWVO\0000
devcon remove @ROOT\LEGACY_XWVO\0000
NOTE that devcon does not set an errorlevel as expected, so one may
need to capture/test STDOUT for errors or success.
Needless to say, this should be used only for non-active (Stopped,
or uninstalled) items. Full Registry Backup required before you
start playing of course.
DEVCON:
http://support.microsoft.com/default...;EN-US;Q311272