Question Locked

Script Add user to Registry Key using Regini?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I create a script that will add a local user to registy key using regini. I know how to create the necesary permissions.

5 replies

by robo_dev

http://techtasks.com/code/viewbookcode/378

' From the book "Windows XP Cookbook"
' ISBN: 0596007256

' ------ SCRIPT CONFIGURATION ------
strUserName = "" ' e.g. rallen
strFullName = "" ' e.g. Robbie Allen
strDescr = "" ' e.g. Employee account
strPassword = ""
strComputer = ""
' ------ END CONFIGURATION ---------
set objSystem = GetObject("WinNT://" & strComputer)
set objUser = objSystem.Create("user", strUserName)
objUser.FullName = strFullName
objUser.Description = strDescr
objUser.SetPassword strPassword
objUser.SetInfo
WScript.Echo objUser.Name & " created"

by starschip

local user already creted, need to assign local user to regkey
the key is in \HKEY_LOCAL_MACHINE\Software\Software App here

I can add the local user o the software key and assign permissions by clicking on properties of the software key while in the registry. I need to script process this without physically accessing each machine registry.
thanks
gary

by cweber

In Group policy management the setting that you want is under
Computer Configuration\Windows Settings\Security Settings\Registry

Add the registry key and the desired permission.

by starschip

gpo not an option, but thanks, the PCs are a select group of PCs subject ot corporate group policies. Corp policies don/t support this SW and the necessary permissions. I am trying to avoid the creation of a seperate group policy container managing this select group of PCS, thus managing users and permissions at the SW key level.

This discussion is closed to new replies.