Jump to content

Problem installing NET Framework in Unattended Mode via cmd files


ravisunny2

Recommended Posts

I tried to mimic the order used by Microsoft Update.

All .NET Framework updates (optional & critical) were placed in E:\NF, in 4 directories

e:\NF\01_Optional\

e:\NF\02_Critical\

e:\NF\03_Critical\

e:\NF\04_Critical\

I created 4 cmd files to apply the updates. The cmd files were chained together, to run sequentially.

There seemed to be no obvious errors, but at the end of the run, the Windows Updates icon states that updates are available to download and install. Obviously some updates did not register.

Can someone please tell me what I am doing wrong ?

I prefer using chained cmd files, because I can just add another cmd file when a new update materializes.

TITLE Unattended NET Framework Optional Updates
CLS
@echo off
ECHO.


ECHO Installing Microsoft .NET Framework 4 Full for Windows XP x86 (KB982670)
start /wait e:\NF\01_Optional\01_NF4_Full\dotNetFx40_Full_x86_x64.exe /passive /norestart
ECHO Done
ECHO.

ECHO Installing Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 3.5 Family Update (KB951847)

REM Note: dotnetfx35_x86.exe was obtained from the catalogue and renamed.

start /wait e:\NF\01_Optional\02_NF3.5SP1Family\dotnetfx35_x86.exe /passive /norestart
start /wait e:\NF\01_Optional\02_NF3.5SP1Family\NDP20SP2-KB958481-x86.exe /passive /norestart
start /wait e:\NF\01_Optional\02_NF3.5SP1Family\NDP30SP2-KB958483-x86.exe /passive /norestart
start /wait e:\NF\01_Optional\02_NF3.5SP1Family\NDP35SP1-KB958484-x86.exe /passive /norestart
ECHO Done
ECHO.

ECHO Installing Microsoft .NET Framework version 1.1

start /wait E:\NF\01_Optional\03_NF1.1\dotnetfx.exe /q:a /c:"install.exe /qb"

ECHO Done
ECHO.

REM Remove ASP.NET User Account created by NET Framework 1.1
net user aspnet /delete

ECHO Setting up NF2_UI.cmd to run at startup

SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce

REG ADD %KEY% /V MY_CMD /D "E:\NF\02_Critical\NF2_UI.cmd" /f

ECHO Shutting down

shutdown.exe -r -f -t 180 -c "Windows XP will now restart in 3 minutes"

ECHO.

EXIT

-------------------------------------------------------------------------------------------------
"E:\NF\02_Critical\NF2_UI.cmd"

TITLE Unattended NET Framework Critical Updates Round 1
CLS
@echo off
ECHO.


ECHO Installing Security Update for .NET Framework 2.0 SP2 and 3.5 SP1 (KB983583)
start /wait e:\NF\02_Critical\NDP20SP2-KB983583-x86.exe /passive /norestart

ECHO Installing Security Update for .NET Framework 3.5 SP1 and .NET Frame 2.0 SP2 (KB982524)
start /wait e:\NF\02_Critical\NDP30SP2-KB982524-x86.exe /passive /norestart

ECHO Installing Security Update for .NET Framework 3.5 SP1 and .NET Frame 2.0 SP2 (KB979909)
start /wait e:\NF\02_Critical\NDP20SP2-KB979909-x86.exe /passive /norestart

ECHO Installing Security Update for .NET Framework 3.5 SP1 Update for Windows XP x86 (KB982168)
start /wait e:\NF\02_Critical\NDP30SP2-KB982168-x86.exe /passive /norestart

ECHO Installing Security Update for .NET Framework 3.5 Service Pack 1 for the .NET Framework Assistant 1.0 x86 (KB963707)
start /wait e:\NF\02_Critical\NDP35SP1-KB963707-x86.exe /passive /norestart

ECHO Done
ECHO.

ECHO Installing Microsoft .NET Framework 1.1 Service Pack 1 (NDP1.1sp1-KB928366)
start /wait e:\NF\02_Critical\NDP1.1sp1-KB928366-X86.exe /Q
ECHO.

ECHO Completed installation of NET Framework Critical Updates Round 1
ECHO.

ECHO Setting up NF3_UI.cmd to run at startup

SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce

REG ADD %KEY% /V MY_CMD /D "E:\NF\03_Critical\NF3_UI.cmd" /f

ECHO Shutting down

shutdown.exe -r -f -t 180 -c "Windows XP will now restart in 3 minutes"

ECHO.

EXIT
--------------------------------------------------------------------------------------
"E:\NF\03_Critical\NF3_UI.cmd"

TITLE Unattended NET Framework Critical Updates Round 2
CLS
@echo off
ECHO.

ECHO Installing Microsoft .NET Framework 1.1 Service Pack 1 (NDP1.1sp1-KB979906)
start /wait e:\NF\03_Critical\NDP1.1sp1-KB979906-X86.exe /passive /norestart
ECHO.

ECHO Completed installation of NET Framework Critical Updates Round 2
ECHO.


ECHO Setting up NF4_UI.cmd to run at startup

SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce

REG ADD %KEY% /V MY_CMD /D "E:\NF\04_Critical\NF4_UI.cmd" /f

ECHO Shutting down

shutdown.exe -r -f -t 180 -c "Windows XP will now restart in 3 minutes"

ECHO.

EXIT
--------------------------------------------------------------------------------
"E:\NF\04_Critical\NF4_UI.cmd"
TITLE Unattended NET Framework Critical Updates Round 3
CLS
@echo off
ECHO.


ECHO Installing Security Update for Microsoft .NET Framework 2.0 SP2 and 3.5 SP1 (KB2418241)
start /wait e:\NF\04_Critical\NDP20SP2-KB2418241-x86.exe /passive /norestart
ECHO.

ECHO Installing Security Update for Microsoft .NET Framework 4 (KB2416472)
start /wait e:\NF\04_Critical\NDP40-KB2416472-x86.exe /passive /norestart
ECHO.

ECHO Installing Security Update for Microsoft .NET Framework 3.5 SP1 (KB2416473)
start /wait e:\NF\04_Critical\ NDP35SP1-KB2416473-x86.exe /passive /norestart
ECHO.

ECHO Installing Security Update for Microsoft .NET Framework 1.1 SP1 (KB2416447)
start /wait e:\NF\04_Critical\ NDP1.1sp1-KB2416447-X86.exe /passive /norestart
ECHO.

ECHO Completed installation of NET Framework Critical Updates Round 3
ECHO.

ECHO Shutting down

shutdown.exe -r -f -t 180 -c "Windows XP will now restart in 3 minutes"

ECHO.

EXIT

Link to comment
Share on other sites


  • 2 weeks later...

try this command, 100% working fine

1) Extract NetFrame v2.0 & v3.5 to folder

2) DO NOT EXTRACT ANY Netframe v4.0 ( because it does not work, has to be download version to run)

Example:-

ECHO Installing Security Update for Microsoft .NET Framework 2.0...

e:\NF\net2\install.exe /qb!

ECHO Installing Security Update for Microsoft .NET Framework v3.5 SP1

e:\NF\netfsp\dotNetFx35setup.exe /q /norestart

ECHO Installing Security Update for Microsoft .NET Framework 4.0...

e:\NF\Net4.exe /passive /norestart

or

REG ADD %KEY%\0290 /VE /D "Installing NetFrameWork v2.0..." /f

REG ADD %KEY%\0290 /V 1 /D "%systemdrive%\App\net2\install.exe /qb!" /f

REG ADD %KEY%\0340 /VE /D "Installing NetFrameWork v3.5 SP1" /f

REG ADD %KEY%\0340 /V 2 /D "%systemdrive%\App\netfsp\dotNetFx35setup.exe /q /norestart" /f

REG ADD %KEY%\0390 /VE /D "Install NetframeWork 4.0..." /f

REG ADD %KEY%\0390 /V 3 /D "%systemdrive%\App\Net4.exe /passive /norestart" /f

Edited by calvinljh
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...