2014-03-10

Windows 8 .NET Framework 3.5 Offline Installation

Windows 8 .NET Framework 3.5 Offline Installation

將以下 Code 存成 *.cmd 執行即可離線安裝 .NET Framework 3.5
參考: http://support.microsoft.com/kb/2785188/zh-tw
@echo off&color a
title, [ + OFFLINE INSTALL OF NET 3.5 FRAMEWORK - DOS_PROBIE.2012 + ] 
:: =Windows 8 includes .Net 4.5 by default but not .NET 3.5 =
::NOTE: INSTALLS .NET 3.5 FRAMWORK FEATURE ON DEMAND (FoD) FROM INSTALL DISC.
::NetFx35.cmd

:: SCAN_ACTIVE DRIVES
set "drv="
for %%a in (D E F G H I J K L M N) do if exist "%%a:\sources\setup.exe" set drv=%%a:&goto :Install
:Install
if defined drv (
echo == Installing NET 3.5 From Drive %drv%
dism /online /enable-feature /featurename:NetFX3 /all /NoRestart /Source:%drv%\sources\sxs /LimitAccess
:: LOG
REM dism /online /Get-FeatureInfo /FeatureName:NetFx3 >%systemdrive%\NetFx3.log
echo.&echo.
cls
echo * DONE *
echo.&echo.
echo == Press any [KEY] to Close This Screen. &pause>nul
) else (
:: NO_DRIVE
echo == No Active Drive Found!..Insert DVD or USB then Start Over. &pause>nul 
echo.
)

沒有留言: