What was the command to install .NET Framework 3.5 offline?

Discussion in 'Windows 10' started by Super Spartan, Aug 14, 2015.

  1. Super Spartan

    Super Spartan MDL Expert

    May 30, 2014
    1,709
    990
    60
    I remember there was a command to install .NET Framework 3.5 offline by placing the installation media in the computer then running a command through DOS.

    Can someone remind me what was the command please?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    #3 murphy78, Aug 14, 2015
    Last edited by a moderator: Apr 20, 2017
    my script for this:
    Code:
    @echo off
    color 1f
    :Begin UAC check and Auto-Elevate Permissions
    :-------------------------------------
    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:
    echo   Requesting Administrative Privileges...
    echo   Press YES in UAC Prompt to Continue
    echo:
    
    
        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"
    :--------------------------------------
    Title NetFx3 Installer Script
    ECHO -------------------------------------------------------------------------------
    echo.                       .NET 2-3.5.1 Installer Script
    ECHO -------------------------------------------------------------------------------
    
    
    ECHO This script will run Windows Update to download the latest version of
    ECHO NetFX3 which includes all netfx versions between 2 and 3.5.1 Family Update.
    ECHO -------------------------------------------------------------------------------
    CHOICE /c YN /n /M "Run this script? (Y/N): "
    set errortemp=%ERRORLEVEL%
    IF %ERRORTEMP% EQU 2 EXIT
    IF %ERRORTEMP% EQU 0 EXIT
    FOR %%i IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) DO (IF EXIST "%%i:\sources\sxs\microsoft-windows-netfx3-ondemand-package.cab" SET NETFX3PATH="%%i:\sources\sxs"&GOTO :OFFLINE)
    dism /online /enable-feature /featurename:netfx3
    ECHO -------------------------------------------------------------------------------
    echo.                                 Finished
    ECHO -------------------------------------------------------------------------------
    echo Press any key to exit...
    pause>NUL
    goto :EOF
    
    
    :OFFLINE
    dism /online /enable-feature /featurename:netfx3 /source:%NETFX3PATH% /limitaccess
    ECHO -------------------------------------------------------------------------------
    echo.                                 Finished
    ECHO -------------------------------------------------------------------------------
    echo Press any key to exit...
    pause>NUL
    goto :EOF
     
  3. Katinka1

    Katinka1 MDL Novice

    Dec 16, 2016
    35
    0
    0
    #4 Katinka1, Mar 17, 2017
    Last edited by a moderator: Apr 20, 2017
    I installed Framework 3.5 from my Windows 8.1 setup Disc onto my installation (of Win8.1) yesterday

    Code:
    Dism /Online /Enable-feature /Featurename:NetFx3 /All /source:D:\sources\Sxs /LimitAccess
    D: would be your driveletter containing ypur windows discs setup files

    I wonder if you can use the Win8.1 (x86) setup files to install Framework 4.0 onto a Windows7 (x64) PC using the same commandline?
     
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,286
    94,786
    450
    Never seen anybody achieve that, there are .net 462 addon's to be used with Windows Toolkit or MSMG can do it too, but not the LP's.
     
  5. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,362
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Katinka1

    Katinka1 MDL Novice

    Dec 16, 2016
    35
    0
    0
    .NET is x86 and x64 compatible right. Then why shouldn't it work?

    Just hesitant to try. Computers blergh. I only need 2 working and backupped devices. Took me two weeks now to sort all this sh.. out. Still not finished.