Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
How to: Use a Script to Change Registry Permissions from the Command Line
Article ID: 245031 - View products that this article applies to.
This article was previously published under Q245031
This article describes how to use a script to change permissions defined in a registry key from a command prompt by using the Regini.exe utility included with Microsoft Windows NT Server 4.0 Resource Kit. The Resource Kit is a separate product that can be purchased from Microsoft.
CAUTION: When you use a script to change registry permissions, you replace the entire set of current permissions defined in a registry key. For example, if you have four types of users whose permissions are defined in a particular registry key, and you create and run a script file that changes the permissions for only three of the four types of users, the information about the fourth type is deleted.
To use a script to change permissions defined in a registry key from a command prompt:
Refer to registry hives as indicated below:
Permissions and their binary number representations are as follows:
HKEY_LOCAL_MACHINE - \Registry\Machine HKEY_USERS - \Registry\Users HKEY_CURRENT_USER - \Registry\User\User_SID (where User_SID is the current user's security identifier)
You can use the Regdmp utility, also included with the Resource Kit, to obtain the current permissions of a registry key in the binary number format.
Administrator Full 1 Administrator R 2 Administrator RW 3 Administrator RWD 4 Creator Full 5 Creator RW 6 World Full 7 World R 8 World RW 9 World RWD 10 Power Users Full 11 Power Users RW 12 Power Users RWD 13 System Op Full 14 System Op RW 15 System Op RWD 16 System Full 17 System RW 18 System R 19 Administrator RWX 20