Remove permissions on a registry key using vbs

Hi,
i'm looking to make a script that will remove permissions (Deny on the Full Control) for the Local Administrators group of the regkey -

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

*that regkey holds the uninstall info for all applications and i need a script to auto remove the permissions of local admins for one of them since they are inherited and i don't want to go one by one.

Is there such a way?
johnnyjonathanAsked:
Who is Participating?
 
yehudahaConnect With a Mentor Commented:
You can do that with a GPO
Computer Configuration\Windows Settings\Security Settings\Registry
Add the key you want, edit the security as need

i attached a screenshot
untitled.JPG
0
 
TakedaTCommented:
Im not sure if there is a way to do it with VBScript alone, but you can use the regini tool from the resource kit along with a vbscript for this.
0
 
johnnyjonathanAuthor Commented:
i have found this option of regini -
http://support.microsoft.com/kb/245031
however i need to give "deny" permissions and not decided on who can Read and who can Write, simply Deny Full Control.
can regini do that?
 
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
TakedaTCommented:
I dont believe that regini can deny permissions.  It can only remove or grant them as far as I know, though removing access achieves almost the same thing as denying it.
0
 
johnnyjonathanAuthor Commented:
yes but how can i remove both R RW and RWD?
0
 
TakedaTCommented:
The tool basically resets the permissions (removing existing) before it adds the permissions that you want.  Is that what you mean?
0
 
johnnyjonathanAuthor Commented:
Perfect!
0
 
yehudahaCommented:
Toda :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.