thanks NTDOC..i'm quite new in this..well i d/load the script from techrepublic.. http://techrepublic.com.com/5138-10879-5800070.html..the author is rick liang..i'm using the latest version of KiXtart..just d/load it last week. i'm going to paste the script here..and the part that i modified..

Code:


;====================================================================================
; Purpose: Check target systems to see what, if any, Windows Updates are pending
; Author: Ric Liang
; Revised: July 14, 2005
; Dependancies: 1) Target systems must have Automatic Updates enabled for auto-downloading
; 2) Must have access rights to default share C$ on remote computer
; 3) Text file containing list of target servers (WU_LIST.TXT)
;
; Downloaded from TechRepublic.com (http://techrepublic.com.com/2001-6240-0.html)
; Copyright ©2005 CNET Networks, Inc. All Rights Reserved.
;====================================================================================

$wu_folder="U:\program files\WindowsUpdate\wuaudnld.tmp\cabs\"

$wu_folder="c:\winnt\softwaredistrubution\download\" <-- i modified this line
$cpu_list="s:\windows\security\wu_list.txt"
$blank=" "

"The following servers require patches be applied:" ?

; Determine which list of computers to check for pending Windows Updates
$io=open(1,$cpu_list,2)
if $io=0
$cpu_name=LTrim(RTrim(ReadLine(1)))
while @error=0
; Connect to C$ on target system using drive U:
$cpu_share="\\"+$cpu_name+"\c$"
use u: /del
use u: $cpu_share

$connect_err=@error

$patches=0
$patchlist=""

if $connect_err=0 and exist($wu_folder)
$folderlist=""
$patchfolder=Dir($wu_folder+"*.*")

While $patchfolder<>"" and @ERROR=0

; Search for patch folder(s)
if $patchfolder<>"." and $patchfolder<>".." and InStr($folderlist,$patchfolder)=0
$folderlist=$folderlist+$patchfolder
$patchexe=$wu_folder+$patchfolder+"\*.exe"

; Retrieve patch EXE
$patch=Dir($patchexe)

if @error=0 and $patch>""
; Determine patch KB (Knowledge Base) number
$dot=InStr($patchfolder,'.')+1
$dash=InStr(Right($patchfolder,LEN($patchfolder)-$dot),'_')
$kb_name=SubStr($patchfolder,$dot,$dash)
$patches=$patches+1
$patchlist=$patchlist+$Kb_name+','
else
; Remove the folder if empty
$patchdir=$wu_folder+$patchfolder
RD "$patchdir"
endif
$patchfolder=Dir($wu_folder+"*.*")
endif
$patchfolder=Dir()
Loop
endif

$patchlist=Left($patchlist,LEN($patchlist)-1)
? "$patches updates for $cpu_name: "

SELECT
CASE $patches=0 and $connect_err
"unable to connect"+chr(13)
CASE $patches=0
chr(13)
CASE $patches>0 and $patches<=6
$patchlist+chr(13)
CASE $patches>6
; Display listing for 6 patches per line, then start a new line
$patcharray=Split("$patchlist",",")
$patchlist=""
$patchnum=0
For Each $patch In $patcharray
$patchlist=$patchlist+$patch+','
$patchnum=$patchnum+1
if $patchnum>6
Left($patchlist,LEN($patchlist)-1) ?
$patchnum=0
$patchlist=""
endif
Next
if $patchnum
chr(13)+Left($blank,16+Len($cpu_name))+Left($patchlist,LEN($patchlist)-1)+chr(13)
$patchlist=""
endif
ENDSELECT

; Get next server name
$cpu_name=LTrim(RTrim(ReadLine(1)))
Loop
endif
$io=close(1)
?
?
:end




the output should be something like this:

2 pending updates for server 1: 89430,892859
2 pending updates for server 2: 842773,589662
2 pending updates for server 3: 254879,365128

my problem is i cannot get the number to be displayed besides the server name.. hope you can help me..


Edited by byetzhourha (2006-05-05 07:15 AM)