PC Review


Reply
Thread Tools Rate Thread

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

 
 
ToddAndMargo@verizon.net
Guest
Posts: n/a
 
      15th Mar 2007
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.)

REGEDIT4
[-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
Enum\Root\LEGACY_PAVAGENTE]

What a pain.

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?

Many thanks,
-T

 
Reply With Quote
 
 
 
 
John John
Guest
Posts: n/a
 
      15th Mar 2007
The .reg file can't change permissions. Subinacl can do that:
http://www.microsoft.com/downloads/d...displaylang=en
http://www.analogduck.com/main/subinacl

or you can try the tool that Mark V suggested yesterday:
http://sourceforge.net/projects/setacl/

John


(E-Mail Removed) 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.)
>
> REGEDIT4
> [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
> Enum\Root\LEGACY_PAVAGENTE]
>
> What a pain.
>
> 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?
>
> Many thanks,
> -T
>


 
Reply With Quote
 
ToddAndMargo@verizon.net
Guest
Posts: n/a
 
      15th Mar 2007

> ToddAndMa...@verizon.net 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.)

>
> > REGEDIT4
> > [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
> > Enum\Root\LEGACY_PAVAGENTE]

>
> > What a pain.

>
> > 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?

>
> > Many thanks,
> > -T


On Mar 15, 11:46 am, John John <audetw...@nbnet.nb.ca> wrote:
> The .reg file can't change permissions. Subinacl can do that:http://www.microsoft.com/downloads/d.../main/subinacl
>
> or you can try the tool that Mark V suggested yesterday:http://sourceforge.net/projects/setacl/
>
> John
>


Hi John,

It looks like the SetACL's will do the trick. Thank you!

-T

 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      15th Mar 2007
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
 
Reply With Quote
 
ToddAndMargo@verizon.net
Guest
Posts: n/a
 
      15th Mar 2007
On Mar 15, 12:37 pm, Mark V <notva...@nul.invalid> wrote:
> 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


Thank you! Thank you for the examples too. Sometimes that is the
only
way I learn (including this time).

-T

 
Reply With Quote
 
ToddAndMargo@verizon.net
Guest
Posts: n/a
 
      18th Mar 2007
On Mar 15, 2:42 pm, ToddAndMa...@verizon.net wrote:
> On Mar 15, 12:37 pm, Mark V <notva...@nul.invalid> wrote:
>
>
>
> > 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

>
> Thank you! Thank you for the examples too. Sometimes that is the
> only
> way I learn (including this time).
>
> -T


Got out to the site. This did the trick (got everything
but ControlSet002's entries, which works for me!):

devcon remove @ROOT\LEGACY_PAVAGENTE\0000
devcon remove @ROOT\LEGACY_PAVATSCHEDULER\0000
devcon remove @ROOT\LEGACY_PAVDRV\0000
devcon remove @ROOT\LEGACY_PAVREPORT\0000
devcon remove @ROOT\LEGACY_PAVSRV\0000

Thank you!


 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      19th Mar 2007
In microsoft.public.win2000.registry, wrote:

> On Mar 15, 2:42 pm, ToddAndMa...@verizon.net wrote:
>> On Mar 15, 12:37 pm, Mark V <notva...@nul.invalid> wrote:


>> > 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.)

[ ]

>> > 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.

[ ]

> Got out to the site. This did the trick (got everything
> but ControlSet002's entries, which works for me!):
>
> devcon remove @ROOT\LEGACY_PAVAGENTE\0000
> devcon remove @ROOT\LEGACY_PAVATSCHEDULER\0000
> devcon remove @ROOT\LEGACY_PAVDRV\0000
> devcon remove @ROOT\LEGACY_PAVREPORT\0000
> devcon remove @ROOT\LEGACY_PAVSRV\0000
>
> Thank you!


You are very welcome. Share it someday with another.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
script to change permissions on exchange folder ? julien Microsoft Outlook 2 16th Apr 2008 11:41 PM
Permissions - Strange Change Permissions issue Greg Saunders Microsoft Windows 2000 Security 3 7th Mar 2008 07:22 AM
Change NTFS Permissions or run shell script Shawn H. Mesiatowsky Microsoft ASP .NET 0 3rd Feb 2005 10:23 PM
Re: Change file permissions with a logon script Jerold Schulman Microsoft Windows 2000 CMD Promt 0 1st Oct 2003 03:15 PM
Re: Change file permissions with a logon script Ray at Microsoft Windows 2000 CMD Promt 0 30th Sep 2003 08:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:22 AM.