Re: how to change a key's permissions with a script?

Tech-Archive recommends: Speed Up your PC by fixing your registry



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.aspx?scid=kb;EN-US;Q311272
.



Relevant Pages

  • Re: how to change a keys permissions with a script?
    ... The .reg file can't change permissions. ... How do I change this key's and sub key's permissions ...
    (microsoft.public.win2000.registry)
  • Re: how to change a keys permissions with a script?
    ... permission setting on the key (I can manually alter ... the key's and sub key's permissions to "everyone", ... Running DEVCON requires Administrators authority but can ... bypass the default permissions which restrict admins in this ...
    (microsoft.public.win2000.registry)
  • Rights Problem with IWAM and IUSR Accounts
    ... Place the following in a .reg file. ... Access Permissions and the Edit Default button. ... IUSR_ServerName account and the Interactive account, ... Whoops I forgot also go to Applications, choose VB Asp ...
    (microsoft.public.inetserver.iis.security)
  • how to change a keys permissions with a script?
    ... I can not get the following *.reg file to work because of a ... permission setting on the key (I can manually alter ... How do I change this key's and sub key's permissions ...
    (microsoft.public.win2000.registry)
  • Corrupted registry key -- cant delete
    ... "Permissions" he gets "You do not have permission to view the current ... All the other subkeys have ... When he ran the .REG file it deleted all the other subkeys, ... So how can he delete this problem key? ...
    (microsoft.public.windowsxp.customize)