Solved

setting registry permissions via script

Posted on 2004-04-15
10
1,192 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
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
 
LVL 83

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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 83

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 83

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is a guide to the following problem (not exclusive but here) on Windows: Users need our support and we supporters often use global administrative accounts to do this. Using these accounts safely is a real challenge. Any admin who takes se…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

11 Experts available now in Live!

Get 1:1 Help Now