Edit Regitry Permissions with script

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I need to add a key and value. The following script works
when logging in w\ admin rights but not as domain user.

Dim shell
Dim key
Dim keyData
Set shell = WScript.CreateObject("wscript.shell")
key = "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon"
shell.RegWrite key, UsrEnvDebugLevel
keyData = "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\UsrEnvDebugLevel"
shell.RegWrite keyData, 10002

Any ideas? I have tried GPO and runas... but no avail.

Thanks in advance
 
Hi Steve, Just a suggestion:
the key:
HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon
has only read access-rights to "Users",
You can change the access-rights via regedt32.exe
but be sure that security would be weak if you do.

The other solution is to create a group which has the access-rights to write
in that key level.(still dangerous)

Why not select a different key,safe enought?
 
Hi Steve, Just a suggestion:
the key:
HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon
has only read access-rights to "Users",
You can change the access-rights via regedt32.exe
but be sure that security would be weak if you do.

The other solution is to create a group which has the access-rights to write
in that key level.(still dangerous)

Why not select a different key,safe enought?
 
In answer to your actual question, though, there's a resource kit utility
called regini.exe that will allow you to change registry permissions, but
you'll need to be an administrator to be able to actually make the change,
which may not be what you want to do.
 
In answer to your actual question, though, there's a resource kit utility
called regini.exe that will allow you to change registry permissions, but
you'll need to be an administrator to be able to actually make the change,
which may not be what you want to do.
 
Back
Top