HELP im setting up an SUS server with a nonactive directory and I need to setup a login script so it will automatically post when a client on the domain logs onto the network. we need to set up their automatic updates to our personal prefrences via this login script. the problem is is that it wont call our 4 other .kix files. i found this code ont he internet and other people say that it works why wont it work for us? the error says Error: "unexpected Command" Script: C:Location\ping.kix Line: 1 Here is the problematic code.Code:
  ;Sus.kix
;This kix file will check the OS and detect compatability with the SUS update. If the update is ;required it will apply the appropriate registry keys.

Break ON
DEBUG OFF
CLS





; ******************************************
;
; MODIFY THESE
;
; ******************************************

$domain = "ScOTT"
$server="\\LANSUSSVR"

; ******************************************
;
; STOP MODIFYING
;
; ******************************************



;variable declaration
Dim $i, $upCount, $reportCount, $yesCount, $incCount, $skipCount, $unCount, $r, $comp, $computer, $os, $oper, $domain, $ResultsINI, $val1, $val2, $regAU, $regWU, $exclude, $ConfigINI; $server

$ResultsINI = 'C:\susres.ini' ;this stores the output of the results
$ConfigINI = 'C:\susconfig.ini'
$regAU =
\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
$regWU =
\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
$exclude = Split(ReadProfileString($ConfigINI,'Exclude',''),Chr(10))
$placeholder = " "




Call "ping.kix"
Call "osid.kix"
Call "netview2.kix"
Call "comnetview.kix"

$yesCount=0
$incCount=0
$skipCount=0
$unCount=0
$reportCount=0
$i=0
$upCount=0

For Each $computer In comnetview();netview2($domain,1)
$i=$i+1
$reportCount=$reportCount + 1
if $reportCount=10
$reportCount=0
?
? "Preliminary Report:"
? " --> SUS Enabled Machines: " + $yesCount + " (" +
$upCount + " new)"
? " --> Unavailable Machines: " + $unCount
? " --> PDC Error'd Machines: " + $skipCount
? " --> Incompatible Machines: " + $incCount
? " Total: " + $i
?
ENDIF
$comp = Split($computer,",")[0]
If AScan($exclude, $comp) = -1
If InStr("$comp", "") ;<---------------------change the group here!
? "Working on: " + $comp
If Ping($comp)=1
$os = OSID($comp)
;get the operating system info on the enumerated PC
If VarType($os) & 8192
$oper = Left($os[1],5)
Else
$skipCount=$skipCount + 1
goto "getout"
EndIf
$oper = Left($os[1],5)
; ? "OS : " + $oper
;this is the print out info
If (($oper = "Win2k") OR ($oper = "WinXP")) ;check the os of the PC against SUS compatability
If KeyExist("\\" + $comp + $regAU)
$val1 = ReadValue("\\" + $comp +
$regWU,"WUServer")
$val2 = ReadValue("\\" + $comp +
$regAU,"ScheduledInstallTime")
If ($val1 = $server AND $val2 =
"10")
$r =
WriteProfileString($ResultsINI,$comp,'Already Added',@DATE + " " + @TIME)

? "No need to update"
$yesCount=$yesCount + 1
Else
$r = WriteValue("\\" + $comp
+ $regAU,"RescheduleWaitTime","30","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"NoAutoRebootWithLoggedOnUsers","1","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"NoAutoUpdate","0","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"AUOptions","4","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"ScheduledInstallDay","0","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"ScheduledInstallTime","10","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regAU,"UseWUServer","1","REG_DWORD")
$r = WriteValue("\\" + $comp
+ $regWU,"WUServer",$server,"REG_SZ")
$r = WriteValue("\\" + $comp
+ $regWU,"WUStatusServer",$server,"REG_SZ")
$r =
WriteProfileString($ResultsINI,$comp,'SUS Updated',@DATE + " " + @TIME)
? "Sus Updated"
$yesCount=$yesCount + 1
EndIf
Else
$r = WriteValue("\\" + $comp +
$regAU,"RescheduleWaitTime","30","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"NoAutoRebootWithLoggedOnUsers","1","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"NoAutoUpdate","0","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"AUOptions","4","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"ScheduledInstallDay","0","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"ScheduledInstallTime","10","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regAU,"UseWUServer","1","REG_DWORD")
$r = WriteValue("\\" + $comp +
$regWU,"WUServer",$server,"REG_SZ")
$r = WriteValue("\\" + $comp +
$regWU,"WUStatusServer",$server,"REG_SZ")
$r =
WriteProfileString($ResultsINI,$comp,'SUS ADDED',@DATE + " " + @TIME)
? "Sus did not exist, added"
$upCount=$upCount+1
$yesCount=$yesCount + 1
EndIf
Else
$r =
WriteProfileString($ResultsINI,$comp,'SUS Incompatable',@DATE + " " + @TIME)
? "Incompatable with SUS."
$incCount=$incCount + 1
EndIf
Else
? $comp + " no longer available."
$unCount=$unCount + 1

EndIf

? "---------------------"
Else
$r = WriteProfileString($ResultsINI,$comp,'Skipped',@DATE +
" " + @TIME)
? $comp + " skipped."
$unCount=$unCount + 1
EndIf
Else
? "-->" + $comp + " on exclude list."
$unCount=$unCount + 1
EndIf

:getout
Next


?
?
?
? "Report:"
? " --> SUS Enabled Machines: " + $yesCount + " (" + $upCount + "
new)"
? " --> Unavailable Machines: " + $unCount
? " --> PDC Error'd Machines: " + $skipCount
? " --> Incompatibl Machines: " + $incCount
?
? " --> Inspected Machines: " + $i
?
? "Please view C:\susres.ini for more information."