Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
Recently, I was looking for links to some of the deployment guides for previous versions of the .NET Framework. After digging through search engine results and my blog archives to find them, I decided it would be easier to create one blog post with links to the deployment guides for all versions of the .NET Framework. Here they are:
For reference, the deployment guides for developers are targeted at developers creating applications that depend on the .NET Framework and that want to incorporate the .NET Framework into their installation process, and the deployment guides for administrators are targeted at system administrators that manage software installation on corporate networks and who want to plan a deployment of the .NET Framework to networks that they manage.
I came up with an idea for using /msioptions along with PATCH= to install the updates at the same time as you are installing .net 4.x. Just extract the MSP files from the EXE updates and place them in a \x86 & \x64 directory accordingly, now use this CMD to launch install (trick works with all 4.x versions)
@ECHO off & setlocal EnableDelayedExpansion
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.
REM :: Change below path to where the NET45 installer/updates are stored.
IF /I NOT EXIST "%D_NET45path%\dotnetfx45_full_x86_x64.exe" GOTO NET_Framework_45_end
ECHO>>"%O_LOGFILE%" 2>>&1 Installing .NET 4.5 Framework
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")
) 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
Code above is off, here it is on a paste site