Take note that if you need to run the .NET cleanup utility you should do
that first.
The XP, 2003 and Vista/2008 portions are well tested. No so with 2000,
and note the complete lack of a Win7/2008 R2 portion.
@echo off
set INSTALLPATH=C:\Path\To\Installation\Files
ver | find /i "Windows 2000" > nul
if not errorlevel 1 set WINVER=win2k
ver | find /i "Windows XP" > nul
if not errorlevel 1 set WINVER=winxp
ver | find /i "Version 5.2" > nul
if not errorlevel 1 set WINVER=win2k3
ver | find /i "Version 6.0.6001" > nul
if not errorlevel 1 set WINVER=vistasp1
ver | find /i "Version 6.0.6002" > nul
if not errorlevel 1 set WINVER=vistasp2
if "%WINVER%" == "win2k" (
msiexec /i %INSTALLPATH%\dnf-1.1\netfx.msi /qb
"%INSTALLPATH%\NDP1.1sp1.exe" /Q /I
"%INSTALLPATH%\NDP1.1sp1-KB886903-X86.exe /Q /I
"%INSTALLPATH%\NDP1.1sp1-KB953297-X86.exe /Q /I
"%INSTALLPATH%\NetFx20SP2_x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB958481-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB974417-x86.exe" /passive /norestart
)
if "%winver%" == "winxp" (
"%INSTALLPATH%\dotnetfx35-sp1.exe" /passive /norestart
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
msiexec /i %INSTALLPATH%\dnf-1.1\netfx.msi /qb
"%INSTALLPATH%\NDP1.1sp1.exe" /Q /I
"%INSTALLPATH%\NDP1.1sp1-KB886903-X86.exe /Q /I
"%INSTALLPATH%\NDP1.1sp1-KB953297-X86.exe /Q /I
"%INSTALLPATH%\NDP20SP2-KB958481-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB974417-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB976569-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB958483-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB976570-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x86.exe" /passive /norestart
)
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
"%INSTALLPATH%\NDP20SP2-KB958481-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB974417-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB976569-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB958483-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB976570-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x64.exe" /passive /norestart
)
)
if "%winver%" == "win2k3" (
"%INSTALLPATH%\dotnetfx35-sp1.exe" /passive /norestart
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
"%INSTALLPATH%\dnf-1.1\2003\NDP1.1sp1.exe" /Q /I
"%INSTALLPATH%\dnf-1.1\2003\NDP1.1sp1-KB886903-X86.exe /Q /I
"%INSTALLPATH%\dnf-1.1\2003\NDP1.1sp1-KB953297-X86.exe /Q /I
"%INSTALLPATH%\NDP20SP2-KB958481-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB974417-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB976569-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB958483-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB976570-x86.exe" /passive /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x86.exe" /passive /norestart
)
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
"%INSTALLPATH%\NDP20SP2-KB958481-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB974417-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP20SP2-KB976569-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB958483-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP30SP2-KB976570-x64.exe" /passive /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x64.exe" /passive /norestart
)
)
if "%winver%" == "vistasp1" (
"%INSTALLPATH%\dotnetfx35-sp1.exe" /passive /norestart
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
wusa "%INSTALLPATH%\Windows6.0-KB958481-x86.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB958483-x86.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB974469-x86.msu" /quiet /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x86.exe" /passive /norestart
)
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
wusa "%INSTALLPATH%\Windows6.0-KB958481-x64.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB958483-x64.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB974469-x64.msu" /quiet /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x64.exe" /passive /norestart
)
)
if "%winver%" == "vistasp2" (
"%INSTALLPATH%\dotnetfx35-sp1.exe" /passive /norestart
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
wusa "%INSTALLPATH%\Windows6.0-KB958481-x86.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB958483-x86.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB974470-x86.msu" /quiet /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x86.exe" /passive /norestart
)
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
wusa "%INSTALLPATH%\Windows6.0-KB958481-x64.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB958483-x64.msu" /quiet /norestart
wusa "%INSTALLPATH%\Windows6.0-KB974470-x64.msu" /quiet /norestart
"%INSTALLPATH%\NDP35SP1-KB958484-x64.exe" /passive /norestart
)
)
Joseph L. Casale wrote:
>> I have a script that does all that for me in the instances where I need
>> to do it manually.
>
> Phil,
> Care to share:)
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
>
--
Phil Brutsche
[email protected]
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~