#161521 - 2006-05-03 11:21 PM
win update on win 2000 server using wu_check.kix
|
byetzhourha
Lurker
Registered: 2006-04-15
Posts: 3
|
hye..wondering if someone can help me with this..i have installed the wu_check.kix script on my pc..i'm using vmware to test this server..basically i have 3 pc all running win 2000 server. one pc(pc A) is set to aotomatically download the patch and the other 2 will exract the patch from this..like the proxy server. well i have installed the kixtart file successfully on all the servers. the probleh is when i run the wu_check.kix script on pc A it will give the output like this:
2 pending updates for server 1: , 2 pending updates for server 2: , 2 pending updates for server 3: ,
according to the original script, i should have the patch id number displayed besides the server name.this is the path to check the update in the original script.. $wu_folder="U:\program files\WindowsUpdate\wuaudnld.tmp\cabs\"
and this is the ONLY changes that i made.. $wu_folder="c:\winnt\softwaredistrubution\download\"
i need to display the patch is number..can anyone help me?
|
Top
|
|
|
|
#161523 - 2006-05-04 04:03 PM
Re: win update on win 2000 server using wu_check.kix
|
byetzhourha
Lurker
Registered: 2006-04-15
Posts: 3
|
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)
|
Top
|
|
|
|
#161525 - 2006-05-04 06:37 PM
Re: win update on win 2000 server using wu_check.kix
|
byetzhourha
Lurker
Registered: 2006-04-15
Posts: 3
|
sorry about the script guys..my bad..well ewook i did try to run the script witout any modification and it didn't work..only after i modified it..it displays the number of pending updates..but i didn't get to display the id patch number..
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|