Re: script registry editing

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 21:25:32 +0100

melvan wrote:

> Hello,
>
> I need a script for registry editing on a remote machine or on a group
> of remote machines.
Hi

Some options:

A)
WMI and it's StdRegProv class (COM interface, can be used from a VBScript):

http://www.microsoft.com/technet/scriptcenter/scripts/os/registry/default.mspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/stdregprov.asp

B)
Regobj.dll from Microsoft (COM interface, can be used from a VBScript):.

http://msdn.microsoft.com/vbasic/downloads/addins/componets/default.aspx

Documentation in regobj.doc and a remote registry example in registry.vbs

You can use a wrapper (encapsulate_regobj.zip) from
http://cwashington.netreach.net to get it more "user friendly" (but
the wrapper doesn't support remote registry directly, but it gives some
good examples on how you can use Regobj.dll)

You can also find a couple of sample scripts there, fill in RegObj in
the quickFIND field.

For more examples on RegObj.dll, go to
http://groups.google.com/advanced_group_search

and fill in e.g. the following words in the "Find messages with all
of the words" field:

RegObj.Registry

C)
You can use the command line utility Reg.exe for this, it supports
remote registry.

Reg.exe comes built in with WinXP and Win2k3.

Reg.exe for Win2k is in the Support Tools found on the Win2k CD,
\Support\Tools\Suptools.msi, or for the latest version of
Support Tools (should work on non-SP4 computers as well):

http://www.microsoft.com/windows2000/downloads/servicepacks/sp4/supporttools.asp

Run "REG QUERY /?" in a command prompt for more help.

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: logoff.vbs
    ... > I can log people off remote workstations using WMI, ... Subject: ImpersoantionLevel other than impersonate ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: managing shared folders with wsh
    ... The WMI option is exactly what I was looking for. ... >> I can't set permissions on the share. ... > Local or remote directories ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.wsh)
  • Re: Remote Registry - Requested registry access is not allowed.
    ... remote registry using this user role. ... authenticating on a remote machine and not using my current login as ... Is there a way of reading the registry through WMI? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: retrieve remote registry variables
    ... > sresult should contain %systemdrive%\Documents and settings\Username ... WMI will always expand the registry values. ... (both support remote registry). ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Windows Management Instrumentation
    ... WMI is a DCOM application, and you should do the lockdown on the DCOM side ... Securing Remote Management with WMI ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.security)