Page 1 of 1 1
Topic Options
#161521 - 2006-05-03 11:21 PM win update on win 2000 server using wu_check.kix
byetzhourha Offline
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
#161522 - 2006-05-04 02:32 AM Re: win update on win 2000 server using wu_check.kix
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Hello and welcome to the board.

Well maybe you could start off by telling us where you got wu_check.kix from.

I just did a search on the board and that name did not come up. The only one I'm aware of that was coding anything and public about it was Glenn and maybe Richard.

Please provide more details on the script and what version of KiXtart you're using. @KiX will tell you the version.

Top
#161523 - 2006-05-04 04:03 PM Re: win update on win 2000 server using wu_check.kix
byetzhourha Offline
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
#161524 - 2006-05-04 04:15 PM Re: win update on win 2000 server using wu_check.kix
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Hi byetzhourha!
first, when posting code, please encapsulate it with the code-tags (much easier to read and standard praxis =).
Second, your modification doesn't seem to work as you wish. there should be no reason for you to alter it. the
$wu_folder="U:\program files\WindowsUpdate\wuaudnld.tmp\cabs\" should point you to the right directory, perhaps a alter if you have program\ instead of program files\. Did you try to run it without altering that variable?

(edit:(now, how does it even list the number of updates *_* ?))


Edited by ewook (2006-05-04 04:21 PM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#161525 - 2006-05-04 06:37 PM Re: win update on win 2000 server using wu_check.kix
byetzhourha Offline
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
#161526 - 2006-05-04 07:23 PM Re: win update on win 2000 server using wu_check.kix
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

sorry about the script guys..my bad..



...then go back and edit it, putting in the code tags.
If you want people to analyze the code, the least you can do is make it readable.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.055 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org