Solved

setting registry permissions via script

Posted on 2004-04-15
10
1,199 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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
 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

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...
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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