Sorry, I replied your post with the wrong script. You need this one:

Code:
 
; **************************************************************************************************************
; * *
; * Dit script controleerd of Security Patch Q824146 geinstalleerd is op Windows XP pc's. *
; * Indien dit niet het geval is wordt het alsnog geinstalleerd. *
; * Datgene wat het script aantreft wordt gelogd *
; * *
; * 14/08/2003 - Co *
; * *
; **************************************************************************************************************

$srv='\\server\log$\Q824146\'+@wksta+'.txt'
If @INWIN=1

Open(1,$srv,5)
$logdata='Workstation'+Chr(9)+'OS'+Chr(9)+'Build'+Chr(9)+'SP'+Chr(9)+'NT Version'+'Mac Address'+Chr(9)+'IPAddress'+Chr(9)+'UserID'+Chr(9)+'Full Name'+Chr(9)+'privilege level'+Chr(9)+'day'+Chr(9)+'date'+Chr(9)+'Time'+Chr(9)+'RPC Version'+Chr(13)+Chr(10)
$nul=WriteLine(1,$logdata)

Dim $KBPath,$RPCver
$KBPath='\\server\patch\Q824146.exe'
$RPCver=GetFileVersion('%windir%\system32\Rpcrt4.dll', 'Productversion')

Select

Case @ProductType='Windows XP Professional' AND NOT KeyExist('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB824146')

Shell '%comspec% /c $KBPath'
$logdata=@Wksta+Chr(9)+@ProductType+Chr(9)+@Build+Chr(9)+@CSD+Chr(9)+@Dos+Chr(9)+@Address+Chr(9)+@IPADDRESS0+Chr(9)+@UserID+Chr(9)+@FullName+Chr(9)+@priv+Chr(9)+@day+Chr(9)+@date+Chr(9)+@Time+Chr(9)+$RPCver+Chr(13)+Chr(10)
$nul=WriteLine(1,$logdata)


Case @ProductType='Windows XP Professional' AND KeyExist('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB824146')
$logdata=@Wksta+Chr(9)+'Q824146 is reeds geinstalleerd'+Chr(13)+Chr(10)
$nul=WriteLine(1,$logdata)



EndSelect
EndIf
:end
$nul=Close(1)


_________________________
Co