You can check the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix

For example:

Code:

$KBPath='\\server1\patches\KB835732_XP.exe'

If KeyExist('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB835732')=0

If Exist ('%tmp%\KB835732_XP.exe')<>1
Shell '%comspec% /c xcopy $KBPath %tmp% /c /h /r'
EndIf
Shell '%comspec% /c %tmp%\KB835732_XP.exe'
Endif

_________________________
Co