Ok, You got your array messed up. Fixed that. The "~" part is the delimiter used in the array so it should be the character that separates the values in your array and not the a computer name. The HKLM shortcut Jooel is talking about works for me in remote admin scripts but it would be worth the labour to change it to the full path if it does not work..
Code:
;See the UDF: fnWMIService - Use the Win32_Service class of WMI to control services
;http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83246
;To do the remote execution of the "wuauclt /resetauthorization /detectnow" look at this UDF
;RemoteExec() - execute a process on remote PCs
;http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83206
If NOT @LogonMode
Break On
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')
Dim $sComputer, $sComputers, $Key, $Nul
;Put all computers into an array.
$sComputers = Split("wrender-lap~fe-crosstec", "~")
$key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\"
;Execute the command bellow on each computer from the array filled above.
For Each $sComputer In $sComputers
;Delete the registry keys.
$Nul = DelValue("\\"+$sComputer+"\"+$Key,'AccountDomainSid')
?@ERROR
?@SERROR
Sleep 2
$Nul = DelValue("\\"+$sComputer+"\"+$Key,'PingID')
?@ERROR
?@SERROR
Sleep 2
$Nul = DelValue("\\"+$sComputer+"\"+$Key,'SusClientId')
?@ERROR
?@SERROR
Sleep 2
;Stop and start the windows update service so new stuff gets initialized.
$Nul = fnWMIService('wuauserv','stop',$sComputer)
$Nul = fnWMIService('wuauserv','start',$sComputer)
Next
Function fnWMIService($sService,$sMethod,Optional $sComputer)
Dim $objWMI,$objSrvc,$nul
If NOT $sComputer
$sComputer=@WKSTA
EndIf
$objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$sComputer+"\root\cimv2")
If @ERROR<0
Exit Val("&"+Right(DecToHex(@ERROR),4))
EndIf
$objSrvc = $objWMI.ExecQuery('Select * from Win32_Service WHERE Name = "'+$sService+'"')
For Each $objSrvc in $objSrvc
$nul=Execute("$"+"fnWMIService = $"+"objSrvc."+$sMethod)
Next
EndFunction
One other thing... could you use the code tags when posting code? The formatting stays as is when code tags are ussed so it is much easier to read the script.