Click to See Complete Forum and Search --> : Update Reg Key from 600 user


Guido Lokietek
06-25-2002, 05:12 PM
I've to create for 600 user the key HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionPoliciesSystemDisableLockWorkstation = 1

I read that i can do it like this

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=imper sonate}!\" &_
strComputer & "
ootdefault:StdRegProv")

strKeyPath = "SOFTWARESystem Admin Scripting Guide"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

for a key in MACHINE, how can I do it for all my users?
Can any one help me?
Sorry about my poor English.

Guido

Ofir Odeny
06-27-2002, 06:11 AM
Guido Hi,

Why do you make your life complicated with VB scripts?
You can distribute the registry key / value with 2 simple steps:
1. On 1 computer - create & export the desired registry key / value to
a *.reg file.
2. Put the *.reg file in a shared directory or in the netlogon directory.
3. Distribute the file via logon script by running the command:
regedit.exe /s %0..file_name.reg (in case of netlogon)
OR regedit.exe /s \SERVER_NAMESHARE_NAMEfile_name.reg
(in case of other share).
Is this what you need?
Mail me if you need more help.
Ofir.


------------
Guido Lokietek at 6/25/2002 6:12:16 PM


I've to create for 600 user the key HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionPoliciesSystemDisableLockWorkstation = 1

I read that i can do it like this

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=imper sonate}!\" &_
strComputer & "
ootdefault:StdRegProv")

strKeyPath = "SOFTWARESystem Admin Scripting Guide"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

for a key in MACHINE, how can I do it for all my users?
Can any one help me?
Sorry about my poor English.

Guido