Solved

setting registry permissions via script

Posted on 2004-04-15
10
1,208 Views
Last Modified: 2013-12-04
I want to set registry permissions with a batch job, any ways to do this on windows xp and 2003 server systems ?
0
Comment
Question by:inferno_gr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 12

Expert Comment

by:trywaredk
ID: 10836759
@echo off
%systemroot%\regedit.exe -s \\YourServerName\YourShareName\YourRegfile.reg
EXIT

Many Regards
Jorgen Malmgren
IT-Supervisor
Denmark

:o) Your brain is like a parachute. It works best when it's open
0
 
LVL 12

Expert Comment

by:trywaredk
ID: 10836772
Examples of regfiles can be found at http://www.winguides.com/registry/
0
 
LVL 12

Expert Comment

by:trywaredk
ID: 10836783
HOW TO: Add, Modify, or Delete Registry Subkeys and Values by Using a Registration Entries (.reg) File
http://support.microsoft.com/default.aspx?scid=kb;EN-US;310516
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

Accepted Solution

by:
oBdA earned 250 total points
ID: 10837545
You can do that with subinacl.exe from the Resource Kit.
For example
subinacl.exe /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root /grant=SomeGroup
subinacl.exe /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root /revoke=SomeGroup

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

The help has sometimes trouble installing. If you open the help shortcut after installing the tools, and just the regular help pops up, completely unrelated to the RK tools, do the following:
Unzip the rktools.exe, which will leave you with rktools.msi, rktools_p.cab, rktools_s.cab. Use the "rktools_p" if you installed on XP professional, the "rktools_s" if Server 2003, extract rktools.xml and rktools.chm of the corresponding file, then copy them to %Systemroot%\Help.
0
 
LVL 38

Assisted Solution

by:Rich Rumble
Rich Rumble earned 250 total points
ID: 10838362
0
 
LVL 2

Author Comment

by:inferno_gr
ID: 10846592
ok, regini from windows 2003 resourse kit, checked and actually regini is already in a fresh win2003 installation without resourse kit, but what about winxp ?
regini of winxp is not performing the same job.
0
 
LVL 84

Expert Comment

by:oBdA
ID: 10854261
Just to clarify that: You don't need to install the Resource Kit on every target computer. All you need is the subinacl.exe file, which can be started from a network share as well; you just need to install the Resource Kit on one machine to get access to the file in the first place. You can use it against remote machine as well by adding \\MachineName in front of the key.
0
 
LVL 84

Expert Comment

by:oBdA
ID: 11454958
Sorry, but I'm afraid that trywaredk's answer is incorrect, so in order to avoid confusion, the http:#10836759 should not be considered a valid solution.
The question was how to set permissions on registry keys using a script. This can definitely NOT be done with .reg files used with the regedit import/export functions. regini.exe and subinacl.exe can do this.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
OfficeMate Freezes on login or does not load after login credentials are input.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 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