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

Discussion in 'Windows 10' started by Ultra Male, Aug 14, 2015.

  1. Ultra Male

    Ultra Male MDL Expert

    May 30, 2014
    1,148
    531
    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. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,730
    6,675
    270
  3. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    6,686
    10,145
    210
    #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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. 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?
     
  5. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    17,457
    22,242
    340
    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.
     
  6. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,542
    5,014
    210
    Thought I was going nuts when I saw EFA11's post, then looked at date, man I miss him, he was the real deal to all. :rip:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. 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.