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
Solved

setting registry permissions via script

Posted on 2004-04-15
10
1,204 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Article by: btan
The intent is not to repeat what many has know about Ransomware but more to join its dots of what is it, who are the victims, why it exists, when and how we respond on infection. Lastly, sum up in a glance to share such information with more to help…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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