Hi. I need to set a registry value on a computer different from the
one where the script will be run. I've never really had to do anything
with the registry before. I think I found some examples on this group,
but I'd like to get some clarification, if someone wouldn't mind taking
the time.

I found this example:

set shell = createobject("wscript.shell")
basekey = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\"
key = basekey & "Control\ComputerName\ComputerName\ComputerName"
shell.regwrite key,strUserIn

In the example it seems that strUserIn would be the value of the
registry, yes?

So if I want the value of this registry key to be "XXX", then I could
do this, right?

HKEY_LOCAL_MACHINE\SOFTWARE\ASCI\ActiveBatch\Current_Version\JobSched\SMTPFrom


set shell = createobject("wscript.shell")
sValue = "XXX"
key = "HKEY_LOCAL_MACHINE\SOFTWARE\" & _
"ASCI\ActiveBatch\Current_Version\JobSched\SMTPFrom"
shell.regwrite key,sValue

I suppose what I don't get is how to make it run on a different
computer. Could someone explain that part?

Thanks,
Jennifer

Re: Change Registry Key on a different computer by W

W
Tue Dec 27 15:28:10 CST 2005

See the reply from Torgeir Bakken (MVP) at
http://www.codecomments.com/archive299-2004-7-240821.html

<jennifer1970@hotmail.com> wrote in message
news:1135713601.569785.307010@g44g2000cwa.googlegroups.com...
> Hi. I need to set a registry value on a computer different from the
> one where the script will be run. I've never really had to do anything
> with the registry before. I think I found some examples on this group,
> but I'd like to get some clarification, if someone wouldn't mind taking
> the time.
>
> I found this example:
>
> set shell = createobject("wscript.shell")
> basekey = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\"
> key = basekey & "Control\ComputerName\ComputerName\ComputerName"
> shell.regwrite key,strUserIn
>
> In the example it seems that strUserIn would be the value of the
> registry, yes?
>
> So if I want the value of this registry key to be "XXX", then I could
> do this, right?
>
> HKEY_LOCAL_MACHINE\SOFTWARE\ASCI\ActiveBatch\Current_Version\JobSched\SMTPFrom
>
>
> set shell = createobject("wscript.shell")
> sValue = "XXX"
> key = "HKEY_LOCAL_MACHINE\SOFTWARE\" & _
> "ASCI\ActiveBatch\Current_Version\JobSched\SMTPFrom"
> shell.regwrite key,sValue
>
> I suppose what I don't get is how to make it run on a different
> computer. Could someone explain that part?
>
> Thanks,
> Jennifer
>