not install .net

Discussion in 'Scripting' started by AhrimanSefid, Mar 11, 2014.

  1. AhrimanSefid

    AhrimanSefid MDL Junior Member

    Apr 12, 2010
    97
    0
    0
    #1 AhrimanSefid, Mar 11, 2014
    Last edited by a moderator: Apr 20, 2017
    plz help me fixed code :
    need very fast install.
    not install .net

    Code:
    @ECHO off
    cls
    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:\Oasdsd.exe SET CDROM=%%i:
    
    SET PP=%cdrom%
    
    set DOTNETINSTALLED=NO
    
    REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Policy\v4.0" >NUL && set DOTNETINSTALLED=YES
    
    IF %DOTNETINSTALLED%==YES goto MAIN
    goto PREREQUISITE
    
    :PREREQUISITE
    REM Execute Prerequisite Setup Program
    START /wait "%PP%\Microsoft .NET Framework 4.0 32 & 64bit\Setup.exe /q /norestart"
    
    ping -n 10 127.0.0.1 > NULL
    
    :MAIN
    REM Execute Main Setup Program
    START /wait Oasdsd.exe
     
  2. ricktendo64

    ricktendo64 MDL Expert

    Apr 20, 2008
    1,397
    2,024
    60
    #2 ricktendo64, Mar 11, 2014
    Last edited by a moderator: Apr 20, 2017
    If you pre-extract you have to add /x86 /x64 to the setup.exe switch, like so

    setup.exe /x86 /x64 /q /norestart

    BTW you should try my .net 4.0 or .net 4.5.1, they already have all the updates integrated

    Also here is a script you can edit for .net 4.0 that will install the updates at the same time, just extract all your MSP files to a folder called x86 and x64 and it will apply them to the installer

    Code:
    @ECHO off & setlocal EnableDelayedExpansion
    SET "O_LOGFILE=%systemdrive%\install.log"
    
    :PROCESSOR
    REM :: Detect OS bit-ness on running system. Assumes 64-bit unless 64-bit components do not exist. 
    SET "ARCH=64" & SET "ARCHP=x64"
    IF /I NOT EXIST "%SystemRoot%\SysWOW64\cmd.exe" (
        IF NOT DEFINED PROCESSOR_ARCHITEW6432 (SET "ARCH=32" & SET "ARCHP=x86")
    ) 
    ECHO>>"%O_LOGFILE%" 2>>&1 System architecture is %ARCH% bit.
    :PROCESSOR_end
    
    :NET_Framework_45
    REM :: Change below path to where the NET45 installer/updates are stored.
    SET "D_NET45path=%CD%"
    IF /I NOT EXIST "%D_NET45path%\dotnetfx45_full_x86_x64.exe" GOTO NET_Framework_45_end
    ECHO>>"%O_LOGFILE%" ......................
    ECHO>>"%O_LOGFILE%" 2>>&1 Installing .NET 4.5 Framework
    SET "F_NET45msp="
    FOR /F %%m IN ('dir /b /s "%D_NET45path%\%ARCHP%\NDP45-KB*.msp"') DO (
      IF NOT DEFINED F_NET45msp (SET "F_NET45msp=%%m") ELSE (SET "F_NET45msp=!F_NET45msp!;%%m")
      ECHO %%m
    ) 1>>"%O_LOGFILE%" 2>>&1
    
    ECHO>>"%O_LOGFILE%" 2>>&1 Executing: %D_NET45path%\dotnetfx45_full_x86_x64.exe /passive /norestart /msioptions "PATCH=%F_NET45msp%"
    %D_NET45path%\dotnetfx45_full_x86_x64.exe /passive /norestart /msioptions "PATCH=%F_NET45msp%" >>"%O_LOGFILE%" 2>>&1
    
    ECHO>>"%O_LOGFILE%" 2>>&1 Completed .NET 4.5 Framework installation
    :NET_Framework_45_end
    EXIT
     
  3. AhrimanSefid

    AhrimanSefid MDL Junior Member

    Apr 12, 2010
    97
    0
    0
    #3 AhrimanSefid, Mar 15, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    but me need .Net 4 not 4.5 And Find Disk Drive.

     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    Net 4.5 is an upgraded version of 4.0
    Everything that works in 4.0 works in 4.5

    The same is true of 4.5.1
     
  5. AhrimanSefid

    AhrimanSefid MDL Junior Member

    Apr 12, 2010
    97
    0
    0
    Me Need only install .Net 4
    thanks