Solved Automated & Offline Dot Net Framework v3.5 installation

TheTAMAS

New Member
Messages
4
Just have a Bootable Windows 8/Server 2012/8.1/Windows 8.1 with Update 1/10 DVD or USB (whichever out of these Windows version you are using) attached to your PC & execute the attached bat file.. :dinesh:

Code:
@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"


@echo off




Title .NET Framework 3.5 Offline Installer
for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\sources\install.wim" set setupdrv=%%I
if defined setupdrv (
echo Found drive %setupdrv%
echo Installing .NET Framework 3.5...
Dism /online /enable-feature /featurename:NetFX3 /All /Source:%setupdrv%:\sources\sxs /LimitAccess
echo.
echo .NET Framework 3.5 successfully installed
echo.
) else (
echo No installation media found!
echo Insert Bootable Pen Drive or DVD and run this file once again. 
echo.
)
pause

@echo off
 

Attachments

  • Double Click Me.bat
    1.2 KB · Views: 71

My Computer

System One

  • OS
    Windows 8 x64
    Computer type
    Laptop
    System Manufacturer/Model
    DELL XPS L502X
    CPU
    i7
    Memory
    8 GB
    Graphics Card(s)
    nVidia 540M
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB
Back
Top