No the above code will not write the values. Yes it is to be run from one machine. Check out the Command reference and the WriteValue function in particular

KiXtart Command Reference
WriteValue

I have commented out the WriteValue lines below since i haven't tested it. But the code should enumerate each computer in your domain and add those values to the registry. Does this make more sense?

Code:

$wuKey = '\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
$auKey = '\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU'

$domain = getobject('WinNT://' + @domain)
$domain.Filter = split('Computer')
for each $computer in $domain
? $computer.Name
;$ = writevalue('\\' + $computer.Name + $wuKey,'WUServer','http://68.165.xx.xx','reg_sz')
;$ = writevalue('\\' + $computer.Name + $wuKey,'WUStatusServer','http://68.165.xx.xx','reg_sz')
;$ = writevalue('\\' + $computer.Name + $auKey,'"NoAutoUpdate','0','reg_dword')
next



Edited by maciep (2005-03-09 10:37 PM)
_________________________
Eric