Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: modify registry settings using WSH

HTVi
TV Discussion Newsgroups

modify registry settings using WSH
jerzdevs <jerzdevs[ at ]gmail.com> 10/6/2008 7:00:17 PM
Can anyone send me to a link that shows some samples of modifying
existing regkey values?

I bought an MSWindows scripting book but it sort of takes the approach
that one already knows how to script. Here's what it says in the
book:

set objShell = WScript.CreateObject ("WScript.Shell")
objShell.regWrite "HKU\TestKey\version" , 56, "REG_DWORD"

I'm trying to do something similar but with HKL so here's what I was
trying:

set objShell = WScript.CreateObject ("WScript.Shell")
objShell.regWrite "HKLM\software\fm\support\poc\wintelpoc" , myname,
"value data"

So basically, I was just given 230 servers to support and we use a
product called BindView to report on server information. We created a
key (string value) named 'wintelpoc' (for our Wintel Point Of Contact)
and I need to change the value to my name.

Thanks to anyone who can help.

Re: modify registry settings using WSH
"Richard Mueller [MVP]" <rlmueller-nospam[ at ]ameritech.nospam.net> 10/6/2008 7:53:57 PM

"jerzdevs" <jerzdevs[ at ]gmail.com> wrote in message
news:94d10096-fee1-464b-ae45-504d60809ae0[ at ]m73g2000hsh.googlegroups.com...
[Quoted Text]
> Can anyone send me to a link that shows some samples of modifying
> existing regkey values?
>
> I bought an MSWindows scripting book but it sort of takes the approach
> that one already knows how to script. Here's what it says in the
> book:
>
> set objShell = WScript.CreateObject ("WScript.Shell")
> objShell.regWrite "HKU\TestKey\version" , 56, "REG_DWORD"
>
> I'm trying to do something similar but with HKL so here's what I was
> trying:
>
> set objShell = WScript.CreateObject ("WScript.Shell")
> objShell.regWrite "HKLM\software\fm\support\poc\wintelpoc" , myname,
> "value data"
>
> So basically, I was just given 230 servers to support and we use a
> product called BindView to report on server information. We created a
> key (string value) named 'wintelpoc' (for our Wintel Point Of Contact)
> and I need to change the value to my name.
>
> Thanks to anyone who can help.
>

Recommended to use WMI to modify registry. You also can do this remotely (if
you have permissions). See this link:

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

In particular, link for Create String and DWORD Values



--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen