Solved

How do I  change ACLs on hkey_classes_root using a script?

Posted on 2004-09-03
4
1,551 Views
Last Modified: 2013-12-04
I need to change permissions on some hkey_classes_root keys using a script and not regedt32.  I need to apply the change to many computers that run an application which won't run with user privileges and requires Administrator privileges on the local station to run.  I've found all the necessary keys to change an make the application functional, however I can only seem to change hkey_user and hkey_local_machine settings with the regini utility.  I can not find the script formatting necessary to change an hkey_root_classes ACL.

I also tried exporting keys with modified ACLs so I can re-imported them as a .reg file but the export/import does not retain the ACL permissions applied.

Any suggestion on how I could proceed?

Thanks!
0
Comment
Question by:dleblanc22
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 11975781
It's easiest with subinacl.exe from the Resource Kit
subinacl.exe /keyreg HKEY_LOCAL_MACHINE\Software\Classes\YourKey /grant=YourUser
should work.

Windows Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

As for regini, this should work as well as soon as you know that HKCR is just a "shortcut" to HKLM\Software\Classes.
0
 
LVL 2

Expert Comment

by:andyswarbs
ID: 12034394
Also regedt32 can be used to alter any permissions
0
 
LVL 83

Expert Comment

by:oBdA
ID: 12034415
... but not in a script.
0
 
LVL 2

Expert Comment

by:andyswarbs
ID: 12039899
my mistake - I should have read  the original Qn more carefully.  thx
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In today's information driven age, entrepreneurs have so many great tools and options at their disposal to help turn good ideas into a thriving business. With cloud-based online services, such as Amazon's Web Services (AWS) or Microsoft's Azure, bus…
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now