@echo off

if %IBM_UX_PKG_WIN_VER%==6.1 goto W2008R2IF
if %IBM_UX_PKG_WIN_VER%==6.0 goto W2008IF
if %IBM_UX_PKG_WIN_VER%==5.2 goto W2003
if %IBM_UX_PKG_WIN_VER%==5.1 goto NOSUPPORT
if %IBM_UX_PKG_WIN_VER%==5.0 goto NOSUPPORT

:W2008R2IF
if %IBM_UX_PKG_WIN_TYPE%==SERVER goto W2008R2
if %IBM_UX_PKG_WIN_TYPE%==WORKSTATION goto NOSUPPORT

:W2008IF
if %IBM_UX_PKG_WIN_TYPE%==SERVER goto W2008
if %IBM_UX_PKG_WIN_TYPE%==WORKSTATION goto NOSUPPORT

:W2008R2
if %IBM_UX_PKG_WIN_PROCESSOR%==x64 goto W2008R2_64
if %IBM_UX_PKG_WIN_PROCESSOR%==AMD64 goto W2008R2_64
goto NOSUPPORT

:W2008
if %IBM_UX_PKG_WIN_PROCESSOR%==x64 goto W2008_64
if %IBM_UX_PKG_WIN_PROCESSOR%==AMD64 goto W2008_64
echo Updating the driver for Microsoft Windows Server 2008 32-bit
cd win2k8-32
goto common

:W2008R2_64
echo Updating the driver for Microsoft Windows Server 2008 R2 64-bit
cd win2k8r2-64
goto common

:W2008_64
echo Updating the driver for Microsoft Windows Server 2008 64-bit
cd win2k8-64
goto common

:W2003
if %IBM_UX_PKG_WIN_PROCESSOR%==x64 goto W2003_64
if %IBM_UX_PKG_WIN_PROCESSOR%==AMD64 goto W2003_64
echo Updating driver for Microsoft Windows Server 2003 32-bit
cd win2k3-32
goto common

:W2003_64
echo Updating driver for Microsoft Windows Server 2003 64-bit
cd win2k3-64
goto common

:common
dprun.exe /S
SET iRC=%ERRORLEVEL%
exit %iRC%

:nosupport
echo This version of Microsoft Windows is not supported by this update.
exit 1