Bob
Wed Mar 16 10:48:04 CST 2005
I am happy to report it seems to work fine. I am sorry to report it makes
very little sense to me!
Also, there has been an ongoing discussion regarding this matter at
isaserver.org as well as the NNTP ISA group.
http://forums.isaserver.org/ultimatebb.cgi?ubb=get_topic;f=30;t=000514#000016
Mr. Shinder, who is Mr. ISA Server in many people's books and runs the
isaserver.org site, is quite interested in contacting you regarding this
matter.
Thanks for your help on this,
Bob
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:Odn%23KuZKFHA.4064@tk2msftngp13.phx.gbl...
> Bob Williamson wrote:
>
>> I am curious if it is possible to script the modifications referenced
>> in Q311218. This is not a simple export/import of a registry key, but
>> rather a modification to a key on each computer due to GUID references.
> Hi
>
> This should do it I think:
>
>
> '--------------------8<----------------------
>
> Const HKLM = &H80000002
>
> sComputer = "."
>
> Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
> & sComputer & "\root\default:StdRegProv")
>
> sKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Linkage"
> sValueName = "Bind"
>
> oReg.GetMultiStringValue HKLM, sKeyPath, sValueName, arValues
>
> arValuesNew = Array()
>
> For i = 0 To UBound(arValues)
> If i = 0 Then
> If LCase(arValues(i)) = "\device\ndiswanip" Then
> ' entry is alredy first in the list, no point in continuing
> Exit For
> Else
> ' put NdisWanIp in the first element in the new array
> ReDim Preserve arValuesNew(0)
> arValuesNew(0) = "\Device\NdisWanIp"
> End If
> End If
>
> If LCase(arValues(i)) <> "\device\ndiswanip" Then
> iCountNew = UBound(arValuesNew) + 1
> ReDim Preserve arValuesNew(iCountNew)
> arValuesNew(iCountNew) = arValues(i)
> End If
> Next
>
> If UBound(arValuesNew) > -1 Then
> oReg.SetMultiStringValue HKLM, sKeyPath, sValueName, arValuesNew
> End If
>
>
> '--------------------8<----------------------
>
>
> --
> 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