Difference between revisions of "Microsoft .NET Framework"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Microsoft .NET Framework 2.0)
(Full Installer)
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
=Offline installer not really offline=
+
The .NET Framework (pronounced dot net) is a software framework. See [http://www.microsoft.com/net Microsoft's .NET page] and [http://en.wikipedia.org/wiki/.NET_Framework Wikipedia].
 +
 
 +
=Notes=
 +
 
 +
The offline installer will try to go online to get language packs if it decides you need them. You can disable this behaviour with the "/lang:ENU" flag (for US English).
 +
 
 +
Another way to run the .NET installer is to extract the contents of dotnetfx.exe, and then invoke the install directly using the /q switch (this also saves a bit of time for the clients).
  
The offline installer will try to go online to get language packs if it decides you need them...
 
You can disable this behaviour with the "/lang:ENU" flag.
 
  
 
=Microsoft .NET Framework 1.1=
 
=Microsoft .NET Framework 1.1=
  
This is a silent installer for Microsoft .NET Framework. Download [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=262D25E3-F589-4842-8157-034D1E7CF3A3 here]
+
This is a silent installer for Microsoft .NET Framework. Download the installer from [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=262D25E3-F589-4842-8157-034D1E7CF3A3 here].
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet112k" name="Microsoft .NET Framework 1.1">
+
<package id="dot-net-1.1" name="Microsoft .NET Framework 1.1">
<!-- Microsoft .NET Framework Version 1.1 Redistributable Package -->
+
 
 
  <check type="file" condition="exists" path="%Windir%\Microsoft.NET\Framework\sbscmp10.dll" />
 
  <check type="file" condition="exists" path="%Windir%\Microsoft.NET\Framework\sbscmp10.dll" />
  <install cmd='%SOFTWARE%\updates\common\enu\dotnetfx.exe /q /c:"install /q"' >
+
 
 +
  <install cmd='%SOFTWARE%\dot-net-1.1\dotnetfx.exe /q /c:"install /q"' >
 
  <exit code="194" reboot="true" />
 
  <exit code="194" reboot="true" />
 
  <exit code="1603" />
 
  <exit code="1603" />
 
  <exit code="3010" reboot="true" />
 
  <exit code="3010" reboot="true" />
 
  </install>
 
  </install>
 +
 
</package>
 
</package>
 
</source>
 
</source>
  
Another way to run the .NET installer:
 
  
Extract the contents of dotnetfx.exe, and then invoke the install directly (this also saves a bit of time for the clients)
+
=Microsoft .NET Framework 1.1 Service Pack 1=
  
<source lang="xml">
+
Download the installer from [http://www.microsoft.com/downloads/details.aspx?familyid=A8F5654F-088E-40B2-BBDB-A83353618B38&displaylang=en here]
<package id="dotnet112k" name="Microsoft .NET Framework 1.1">
+
<!-- Microsoft .NET Framework Version 1.1 Redistributable Package -->
+
<check type="file" condition="exists" path="%Windir%\Microsoft.NET\Framework\sbscmp10.dll" />
+
<install cmd='%SOFTWARE%\updates\common\enu\install /q' >
+
<exit code="194" reboot="true" />
+
<exit code="1603" />
+
<exit code="3010" reboot="true" />
+
</install>
+
</package>
+
</source>
+
  
And Microsoft .NET Framework 1.1 Service Pack 1 (download [http://www.microsoft.com/downloads/details.aspx?familyid=A8F5654F-088E-40B2-BBDB-A83353618B38&displaylang=en here]):
+
==32-bit==
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet11sp12k" name="Microsoft .NET Framework 1.1 Service Pack 1">
+
<package id="dot-net-1.1-sp1" name="Microsoft .NET Framework 1.1 Service Pack 1">
<!-- Microsoft .NET Framework 1.1 Service Pack 1 -->
+
 
 
  <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />
 
  <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />
  <install cmd='%SOFTWARE%\updates\common\NDP1.1sp1-KB867460-X86.exe /q /i' >
+
 
 +
  <install cmd='%SOFTWARE%\dot-net-1.1-sp1\NDP1.1sp1-KB867460-X86.exe /q /i' >
 
  <exit code="194" reboot="true" />
 
  <exit code="194" reboot="true" />
 
  <exit code="1603" />
 
  <exit code="1603" />
 
  <exit code="3010" reboot="true" />
 
  <exit code="3010" reboot="true" />
 
  </install>
 
  </install>
 +
 
</package>  
 
</package>  
 
</source>
 
</source>
  
Same for X64 system:
+
 
 +
==64-bit(?)==
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet11sp12k" name="Microsoft .NET Framework 1.1 Service Pack 1">
+
<package id="dot-net-1.1-sp1" name="Microsoft .NET Framework 1.1 Service Pack 1">
<!-- Microsoft .NET Framework 1.1 Service Pack 1 -->
+
 
 
  <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />
 
  <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />
  <install cmd='%SOFTWARE%\updates\common\NDP1.1sp1-KB867460-X86.exe /q /i' >
+
 
 +
  <install cmd='%SOFTWARE%\dot-net-1.1-sp1\NDP1.1sp1-KB867460-X86.exe /q /i' >
 
  <exit code="194" reboot="true" />
 
  <exit code="194" reboot="true" />
 
  <exit code="1603" />
 
  <exit code="1603" />
 
  <exit code="3010" reboot="true" />
 
  <exit code="3010" reboot="true" />
 
  </install>
 
  </install>
 +
 
</package>  
 
</package>  
 
</source>
 
</source>
  
=Microsoft .NET Framework 2.0=
 
  
Download link: [http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5 Microsoft .NET Framework 2.0 Redistributable (x86)].
+
=Microsoft .NET Framework 2.0=
  
Download link: [http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&displaylang=en Microsoft .NET Framework 2.0 SP1 Redistributable (x64)].
+
Download [http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5 Microsoft .NET Framework 2.0 Redistributable (x86)].
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet20" name="%pkgname%">
+
<package id="dot-net-2.0" name="%pkgname%">
 
   
 
   
 
  <variable name="pkgname" value="Microsoft .NET Framework 2.0" />
 
  <variable name="pkgname" value="Microsoft .NET Framework 2.0" />
Line 77: Line 76:
 
  <check type="logical" condition="or">
 
  <check type="logical" condition="or">
 
         <check type="uninstall" condition="exists" path="%pkgname% Service Pack 2" />
 
         <check type="uninstall" condition="exists" path="%pkgname% Service Pack 2" />
 +
 
         <check type="uninstall" condition="exists" path="%pkgname% Service Pack 1" />
 
         <check type="uninstall" condition="exists" path="%pkgname% Service Pack 1" />
 +
 
         <check type="uninstall" condition="exists" path="%pkgname%" />
 
         <check type="uninstall" condition="exists" path="%pkgname%" />
 
  </check>
 
  </check>
 
   
 
   
  <install cmd='%SOFTWARE%\updates\common\enu\dotnetfx2.exe /q /c:"install /q"' >
+
  <install cmd='%SOFTWARE%\dot-net-2.0\dotnetfx2.exe /q /c:"install /q"' >
 
   <exit code="194" reboot="true" />
 
   <exit code="194" reboot="true" />
 
   <exit code="1603" />
 
   <exit code="1603" />
 
   <exit code="3010" reboot="true" />
 
   <exit code="3010" reboot="true" />
 
  </install>
 
  </install>
 +
 
</package>
 
</package>
 
</source>
 
</source>
 +
  
 
=Microsoft .NET Framework 2.0 language pack=
 
=Microsoft .NET Framework 2.0 language pack=
Line 94: Line 97:
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet20lp" name="Microsoft .NET Framework 2.0 Language Pack">
+
<package id="dot-net-2.0-language-pack" name="Microsoft .NET Framework 2.0 Language Pack">
 +
 
 
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Language Pack - DEU" />
 
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Language Pack - DEU" />
  <install cmd='%SOFTWARE%\updates\common\enu\langpackfx2.exe /q /c:"install /q"' />
+
 
 +
  <install cmd='%SOFTWARE%\dot-net-2.0-language-pack\langpackfx2.exe /q /c:"install /q"' />
 +
 
 
</package>
 
</package>
 
</source>
 
</source>
 +
  
 
=Microsoft .NET Framework 2.0 SP1=
 
=Microsoft .NET Framework 2.0 SP1=
  
Download link: [http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en Microsoft .NET Framework 2.0 SP1 Redistributable (x86)].
+
Download [http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en Microsoft .NET Framework 2.0 SP1 Redistributable (x86)].
  
Download link: [http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&displaylang=en Microsoft .NET Framework 2.0 SP1 Redistributable (x64)].
+
Download [http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&displaylang=en Microsoft .NET Framework 2.0 SP1 Redistributable (x64)].
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet20" name="Microsoft .NET Framework 2.0">
+
<package id="dot-net-2.0" name="Microsoft .NET Framework 2.0 SP1">
 +
 
 
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 1" />
 
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 1" />
  <install cmd='%SOFTWARE%\dotNET\NetFx20SP1_x86.exe /q /c:"install /q"' >
+
 
 +
  <install cmd='%SOFTWARE%\dot-net-2.0-sp1\NetFx20SP1_x86.exe /q /c:"install /q"' >
 
   <exit code="194" reboot="true" />
 
   <exit code="194" reboot="true" />
 
   <exit code="1603" />
 
   <exit code="1603" />
Line 120: Line 129:
 
   <exit code="3010" reboot="true" />
 
   <exit code="3010" reboot="true" />
 
  </remove>
 
  </remove>
 +
 
</package>
 
</package>
 
</source>
 
</source>
  
=Microsoft .NET Framework 3.0=
 
  
Download from: [http://go.microsoft.com/fwlink/?LinkId=70848 Microsoft .NET Framework 3.0 X86 redist]
+
=Microsoft .NET Framework 3.0=
  
Download from: [http://go.microsoft.com/fwlink/?LinkId=70849 Microsoft .NET Framework 3.0 X64 resist]
+
Download [http://go.microsoft.com/fwlink/?LinkId=70848 32-bit redistributable]
 
+
Download from: [http://go.microsoft.com/fwlink/?LinkId=98105 Microsoft .NET Framework 3.0 SP1 X86 redist]
+
 
+
Download from: [http://go.microsoft.com/fwlink/?LinkId=98106 Microsoft .NET Framework 3.0 SP1 X64 resist]
+
  
 +
Download [http://go.microsoft.com/fwlink/?LinkId=70849 64-bit redistributable]
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet30" name="Microsoft .NET Framework 3.0" revision="1" priority="900" >
+
<package id="dot-net-3.0" name="Microsoft .NET Framework 3.0" revision="1" priority="900" >
 +
 
 
<check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.0" />
 
<check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.0" />
<install cmd='%SOFTWARE%\updates\common\dotnetfx3.exe /q /norestart' >
+
 
 +
<install cmd='%SOFTWARE%\dot-net-3.0\dotnetfx3.exe /q /norestart' >
 
   <exit code="194" reboot="true" />
 
   <exit code="194" reboot="true" />
 
   <exit code="1603" />
 
   <exit code="1603" />
 
   <exit code="3010" reboot="true" />
 
   <exit code="3010" reboot="true" />
 
</install>
 
</install>
 +
 
</package>
 
</package>
 
</source>
 
</source>
 +
 +
 +
=Microsoft .NET Framework 3.0 SP1=
 +
 +
Download [http://go.microsoft.com/fwlink/?LinkId=98105 32-bit redistributable]
 +
 +
Download from: [http://go.microsoft.com/fwlink/?LinkId=98106 64-bit redistributable]
 +
  
 
=Microsoft .NET Framework 3.5 SP1=
 
=Microsoft .NET Framework 3.5 SP1=
Download from http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7 (choose/change your language and scroll down to "To download the full package, rather than the bootstrapper, click on the link below: .NET Framework 3.5 Service Pack 1 (Full Package)".
+
Download the 'Full Package' (as opposed to the 'Bootstrapper') from http://www.microsoft.com/en-gb/download/details.aspx?id=25150.
  
The "or" file check will skip the installation and mark the software as "installed" on system that has dotnet3.5 preinstalled (e.g. Windows 7)
+
The "or" file check will skip the installation and mark the software as "installed" on systems that have .NET 3.5 pre-installed (e.g. Windows 7).
  
 
<source lang="xml">
 
<source lang="xml">
<package id="dotnet35" name="Microsoft .NET Framework 3.5 SP1" revision="1" priority="900" >
+
<package id="dot-net-3.5-sp1" name="Microsoft .NET Framework 3.5 SP1" revision="1" priority="900" >
 +
 
 
<check type='logical' condition='or'>
 
<check type='logical' condition='or'>
 
   <check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.5 SP1" />
 
   <check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.5 SP1" />
 +
 
   <check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v3.5\MSBuild.exe' />
 
   <check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v3.5\MSBuild.exe' />
 
</check>
 
</check>
<install cmd='%SOFTWARE%\updates\common\dotnetfx35.exe /q /norestart' >
+
 
 +
<install cmd='%SOFTWARE%\dot-net-3.5-sp1\dotnetfx35.exe /q /norestart' >
 
   <exit code="194" reboot="true" />
 
   <exit code="194" reboot="true" />
 
   <exit code="1603" />
 
   <exit code="1603" />
 
   <exit code="3010" reboot="true" />
 
   <exit code="3010" reboot="true" />
 
</install>
 
</install>
 +
 
<remove cmd='MsiExec.exe /qn /X{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}' />
 
<remove cmd='MsiExec.exe /qn /X{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}' />
 +
 
</package>
 
</package>
 
</source>
 
</source>
  
Or, an alternative method for the remove line, is to use the string reported in the HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall key.
 
In fact that does not report the {CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9} GUID, but states that the uninstallation string is:
 
  
  "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe"
+
An alternative remove line is to use:
 +
<source lang="xml">
 +
  <remove cmd='"%WINDIR%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" '/>
 +
</source>
  
That would bring up the interactive installation/uninstallation/repair screen so we should use it with the following parameters:
+
=Microsoft .NET Framework 4 Full (Microsoft .NET Framework 4 Client Profile + Microsoft .NET Framework 4 Extended)=
  
/q
+
This is the last version available for Windows XP. Download from http://www.microsoft.com/download/en/details.aspx?id=17718
/uninstall
+
/norestart
+
(more command line switches are available executing the setup with /?.)
+
  
So the remove line could as well be:
+
There is no 'or' in the 'check' line for .NET 4.0 (as there was with .NET 3.5) as it was never distributed pre-installed with a version of Windows.
  
  <remove cmd='"%WINDIR%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /q /uninstall /norestart'/>
+
==A version that runs the installer from the server so that it is unpacked from there to C:==
 +
 
 +
<source lang="xml">
 +
 
 +
<package id="dotnetfx4" name="Microsoft .NET Framework 4" revision="1" priority="0" >
 +
 
 +
<!-- Version 4.0.2 -->
 +
<check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' />
 +
 
 +
<install cmd='%SOFTWARE%\Microsoft\dotNetFramework\dotNetFx40_Full_x86_x64.exe /norestart /passive' >
 +
  <exit code="0" />
 +
  <exit code="194" reboot="true" />
 +
  <exit code="1603" />
 +
  <exit code="3010" reboot="true" />
 +
</install>
 +
 
 +
<upgrade include="install" />  
 +
 
 +
<remove cmd='MsiExec.exe /qn /X{8E34682C-8118-31F1-BC4C-98CD9675E1C2}' />
 +
 
 +
</package>
 +
</source>
 +
 
 +
==A version that copies the installer to C: first so that it is unpacked locally==
 +
 
 +
<source lang="xml">
 +
 
 +
<package id="dotnetfx4" name="Microsoft .NET Framework 4" revision="1" priority="0" >
 +
 
 +
<!-- Version 4.0.2 -->
 +
<check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' />
 +
 
 +
<install cmd='xcopy "%SOFTWARE%\Microsoft\dotNetFramework\dotNetFx40_Full_x86_x64.exe" c:\dotNetInstallers\ /c /r /y /q' />
 +
 
 +
<install cmd='c:\dotNetInstallers\dotNetFx40_Full_x86_x64.exe /norestart /passive' >
 +
  <exit code="0" />
 +
  <exit code="194" reboot="true" />
 +
  <exit code="1603" />
 +
  <exit code="3010" reboot="true" />
 +
</install>
 +
 
 +
<install cmd='rmdir c:\dotNetInstallers /S /Q' />
 +
 
 +
<upgrade include="install" /> 
 +
 
 +
<remove cmd='MsiExec.exe /qn /X{8E34682C-8118-31F1-BC4C-98CD9675E1C2}' />
 +
 
 +
</package>
 +
</source>
 +
 
 +
=Microsoft .NET Framework 4.5=
 +
Download from http://msdn.microsoft.com/de-de/library/vstudio/5a4x27ek.aspx
 +
 
 +
You need the full installation file, rather than the web installer: dotNetFx45_Full_x86_x64.exe and the Language Pack i.e. dotNetFx45LP_Full_x86_x64de.exe
 +
 
 +
"The .NET Client Profile is a subset of the .NET Framework that was provided with .NET Framework 4 and earlier versions and was optimized for client applications. The .NET Framework 4 and earlier versions provided two deployment options: the full .NET Framework and the Client Profile. The Client Profile enabled faster deployment and smaller app installation packages than the full .NET Framework.
 +
Starting with the .NET Framework 4.5, the Client Profile has been discontinued and only the full redistributable package is available. Optimizations provided by the .NET Framework 4.5, such as smaller download size and faster deployment, have eliminated the need for a separate deployment package." - http://msdn.microsoft.com/en-us/library/cc656912.aspx
 +
 
 +
==Full Installer==
 +
 
 +
<source lang="xml">
 +
 
 +
<package id="dotnetfx45" name="Microsoft .NET Framework 4.5" revision="1" priority="0" >
 +
 
 +
<check type='logical' condition='or'>
 +
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 4.5.*" />
 +
</check>
 +
 
 +
<install cmd='xcopy "%SOFTWARE%\net\dotNetFx45_Full_x86_x64.exe" c:\dotNetInstallers\ /c /r /y /q' />
 +
 
 +
<install cmd='c:\dotNetInstallers\dotNetFx45_Full_x86_x64.exe /norestart /passive' >
 +
  <exit code="0" />
 +
  <exit code="194" reboot="true" />
 +
  <exit code="1603" />
 +
  <exit code="3010" reboot="true" />
 +
</install>
 +
 
 +
<install cmd='%comspec% /c del /S /Q "c:\dotNetInstallers" > nul' />
 +
 +
<upgrade include="install" /> 
 +
 +
<remove cmd='MsiExec.exe /qn /X{1AD147D0-BE0E-3D6C-AC11-64F6DC4163F1}' />
 +
 +
</package>
 +
 
 +
</source>
 +
 
 +
Another option. This script verifies that .NET 4.5 is installed with PowerShell by [https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed checking the release as specified by Microsoft]. This is the package referenced by the [[Windows Management Framework]] package.
 +
 
 +
<source lang="xml">
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
 
 +
<packages>
 +
 
 +
    <package
 +
id="microsoft-dotnet45"
 +
name="Microsoft .NET Framework 4.5.2"
 +
revision="4.5.2"
 +
priority="50" >
 +
 +
<check type="execute" path="powershell.exe -Command &quot;&amp;{ exit ( Get-ChildItem -Path &apos;HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full&apos; | Foreach-Object { $_.GetValue( &apos;Release&apos; ) } | ForEach-Object { $_ -ge 378389 } ) }&quot;" condition="exitcodeequalto" value="1" />
 +
 +
<install cmd='"%SOFTWARE%\Microsoft\DotNet-4.5.2\NDP452-KB2901907-x86-x64-AllOS-ENU.exe" /norestart /passive' >
 +
  <exit code="0" />
 +
  <exit code="194" reboot="true" />
 +
  <exit code="1603" />
 +
  <exit code="3010" reboot="true" />
 +
</install>
 +
 +
<upgrade include="install" />
 +
 +
</package>
 +
 
 +
</packages>
 +
</source>
 +
 
 +
==Language Pack==
 +
 
 +
<source lang="xml">
 +
 
 +
<package id="dotnetfx45lp" name="Microsoft .NET Framework 4.5 Language Pack DE" revision="1" priority="0" >
 +
 
 +
<depends package-id="dotnetfx45"/>
 +
 
 +
<check type='logical' condition='or'>
 +
  <check type="uninstall" condition="exists" path="Microsoft .NET Framework 4.5 DEU Language Pack" />
 +
</check>
 +
 
 +
<install cmd='xcopy "%SOFTWARE%\net\dotNetFx45LP_Full_x86_x64de.exe" c:\dotNetInstallers\ /c /r /y /q' />
 +
 
 +
<install cmd='c:\dotNetInstallers\dotNetFx45LP_Full_x86_x64de.exe /norestart /passive' >
 +
  <exit code="0" />
 +
  <exit code="194" reboot="true" />
 +
  <exit code="1603" />
 +
  <exit code="3010" reboot="true" />
 +
</install>
 +
 
 +
<install cmd='%comspec% /c del /S /Q "c:\dotNetInstallers" > nul' />
 +
 +
<upgrade include="install" /> 
 +
 +
<remove cmd='MsiExec.exe /qn /X{1AD147D0-BE0E-3D6C-AC11-64F6DC4163F1}' />
 +
 +
</package>
 +
 
 +
</source>
 +
 
 +
=Microsoft .NET Framework 2 and 3 for Windows 10=
 +
* Have an ISO for Win10 available on the network
 +
* This package will do the same as enabling dotnet 2 and 3 from the Control Panel/Add-Remove programs/Enable-disable windows features
 +
 
 +
<source lang="xml">
 +
<package id="dotnet-10" name="Microsoft .NET Framework 2.0 and 3.5 for W10">
 +
  <variable name="pkgname" value="Microsoft .NET Framework 2.0 and 3.5 for W10" />
 +
  <variable name="PKG_VERSION"        value="201509040904" />   
 +
  <variable name="PKG_SOURCE"        value="\\172.16.1.10\Temporary\ISO\Windows10\Windows10ProEnUSx64"/><!-- downloaded W10x64 ISO any language -->
 +
  <variable name="PKG_EXE_NAME"      value="dotnetfx2.exe" />
 +
 
 +
  <check type="logical" condition="or">
 +
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 2" />
 +
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 1" />
 +
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0" />
 +
    <check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe' />
 +
  </check>
 +
 +
  <install cmd='Dism /online /enable-feature /featurename:NetFX3 /All /Source:"%PKG_SOURCE%\sources\sxs" /LimitAccess' architecture="x64">
 +
    <exit code="any" />
 +
  </install>
 +
</package>
 +
</source>
  
  
 
[[Category:Silent Installers]]
 
[[Category:Silent Installers]]
 
[[Category:Microsoft software]]
 
[[Category:Microsoft software]]

Latest revision as of 22:46, 27 December 2017

The .NET Framework (pronounced dot net) is a software framework. See Microsoft's .NET page and Wikipedia.

Notes

The offline installer will try to go online to get language packs if it decides you need them. You can disable this behaviour with the "/lang:ENU" flag (for US English).

Another way to run the .NET installer is to extract the contents of dotnetfx.exe, and then invoke the install directly using the /q switch (this also saves a bit of time for the clients).


Microsoft .NET Framework 1.1

This is a silent installer for Microsoft .NET Framework. Download the installer from here.

<package id="dot-net-1.1" name="Microsoft .NET Framework 1.1">

 <check type="file" condition="exists" path="%Windir%\Microsoft.NET\Framework\sbscmp10.dll" />

 <install cmd='%SOFTWARE%\dot-net-1.1\dotnetfx.exe /q /c:"install /q"' >
 <exit code="194" reboot="true" />
 <exit code="1603" />
 <exit code="3010" reboot="true" />
 </install>

</package>


Microsoft .NET Framework 1.1 Service Pack 1

Download the installer from here

32-bit

<package id="dot-net-1.1-sp1" name="Microsoft .NET Framework 1.1 Service Pack 1">

 <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />

 <install cmd='%SOFTWARE%\dot-net-1.1-sp1\NDP1.1sp1-KB867460-X86.exe /q /i' >
 <exit code="194" reboot="true" />
 <exit code="1603" />
 <exit code="3010" reboot="true" />
 </install>

</package>


64-bit(?)

<package id="dot-net-1.1-sp1" name="Microsoft .NET Framework 1.1 Service Pack 1">

 <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP" />

 <install cmd='%SOFTWARE%\dot-net-1.1-sp1\NDP1.1sp1-KB867460-X86.exe /q /i' >
 <exit code="194" reboot="true" />
 <exit code="1603" />
 <exit code="3010" reboot="true" />
 </install>

</package>


Microsoft .NET Framework 2.0

Download Microsoft .NET Framework 2.0 Redistributable (x86).

<package id="dot-net-2.0" name="%pkgname%">
 
 <variable name="pkgname" value="Microsoft .NET Framework 2.0" />
 
 <check type="logical" condition="or">
        <check type="uninstall" condition="exists" path="%pkgname% Service Pack 2" />

        <check type="uninstall" condition="exists" path="%pkgname% Service Pack 1" />

        <check type="uninstall" condition="exists" path="%pkgname%" />
 </check>
 
 <install cmd='%SOFTWARE%\dot-net-2.0\dotnetfx2.exe /q /c:"install /q"' >
  <exit code="194" reboot="true" />
  <exit code="1603" />
  <exit code="3010" reboot="true" />
 </install>

</package>


Microsoft .NET Framework 2.0 language pack

Replace DEU with whatever language pack you will be installing:

<package id="dot-net-2.0-language-pack" name="Microsoft .NET Framework 2.0 Language Pack">

 <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Language Pack - DEU" />

 <install cmd='%SOFTWARE%\dot-net-2.0-language-pack\langpackfx2.exe /q /c:"install /q"' />

</package>


Microsoft .NET Framework 2.0 SP1

Download Microsoft .NET Framework 2.0 SP1 Redistributable (x86).

Download Microsoft .NET Framework 2.0 SP1 Redistributable (x64).

<package id="dot-net-2.0" name="Microsoft .NET Framework 2.0 SP1">

 <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 1" />

 <install cmd='%SOFTWARE%\dot-net-2.0-sp1\NetFx20SP1_x86.exe /q /c:"install /q"' >
  <exit code="194" reboot="true" />
  <exit code="1603" />
  <exit code="3010" reboot="true" />
 </install>

 <remove cmd='msiexec /x {B508B3F1-A24A-32C0-B310-85786919EF28} REBOOT=ReallySuppress /l*v %temp%\netfx20sp1_uninstall_log.txt /qn' >
  <exit code="194" reboot="true" />
  <exit code="1603" />
  <exit code="3010" reboot="true" />
 </remove>

</package>


Microsoft .NET Framework 3.0

Download 32-bit redistributable

Download 64-bit redistributable

<package id="dot-net-3.0" name="Microsoft .NET Framework 3.0" revision="1" priority="900" >

<check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.0" />

<install cmd='%SOFTWARE%\dot-net-3.0\dotnetfx3.exe /q /norestart' >
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

</package>


Microsoft .NET Framework 3.0 SP1

Download 32-bit redistributable

Download from: 64-bit redistributable


Microsoft .NET Framework 3.5 SP1

Download the 'Full Package' (as opposed to the 'Bootstrapper') from http://www.microsoft.com/en-gb/download/details.aspx?id=25150.

The "or" file check will skip the installation and mark the software as "installed" on systems that have .NET 3.5 pre-installed (e.g. Windows 7).

<package id="dot-net-3.5-sp1" name="Microsoft .NET Framework 3.5 SP1" revision="1" priority="900" >

<check type='logical' condition='or'>
   <check type="uninstall" condition="exists" path="Microsoft .NET Framework 3.5 SP1" />

   <check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v3.5\MSBuild.exe' />
</check>

<install cmd='%SOFTWARE%\dot-net-3.5-sp1\dotnetfx35.exe /q /norestart' >
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

<remove cmd='MsiExec.exe /qn /X{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}' />

</package>


An alternative remove line is to use:

 <remove cmd='"%WINDIR%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" '/>

Microsoft .NET Framework 4 Full (Microsoft .NET Framework 4 Client Profile + Microsoft .NET Framework 4 Extended)

This is the last version available for Windows XP. Download from http://www.microsoft.com/download/en/details.aspx?id=17718

There is no 'or' in the 'check' line for .NET 4.0 (as there was with .NET 3.5) as it was never distributed pre-installed with a version of Windows.

A version that runs the installer from the server so that it is unpacked from there to C:

<package id="dotnetfx4" name="Microsoft .NET Framework 4" revision="1" priority="0" >

<!-- Version 4.0.2 -->
<check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' />

<install cmd='%SOFTWARE%\Microsoft\dotNetFramework\dotNetFx40_Full_x86_x64.exe /norestart /passive' >
   <exit code="0" />
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

<upgrade include="install" />  

<remove cmd='MsiExec.exe /qn /X{8E34682C-8118-31F1-BC4C-98CD9675E1C2}' />

</package>

A version that copies the installer to C: first so that it is unpacked locally

<package id="dotnetfx4" name="Microsoft .NET Framework 4" revision="1" priority="0" >

<!-- Version 4.0.2 -->
<check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' />

<install cmd='xcopy "%SOFTWARE%\Microsoft\dotNetFramework\dotNetFx40_Full_x86_x64.exe" c:\dotNetInstallers\ /c /r /y /q' />

<install cmd='c:\dotNetInstallers\dotNetFx40_Full_x86_x64.exe /norestart /passive' >
   <exit code="0" />
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

<install cmd='rmdir c:\dotNetInstallers /S /Q' />

<upgrade include="install" />  

<remove cmd='MsiExec.exe /qn /X{8E34682C-8118-31F1-BC4C-98CD9675E1C2}' />

</package>

Microsoft .NET Framework 4.5

Download from http://msdn.microsoft.com/de-de/library/vstudio/5a4x27ek.aspx

You need the full installation file, rather than the web installer: dotNetFx45_Full_x86_x64.exe and the Language Pack i.e. dotNetFx45LP_Full_x86_x64de.exe

"The .NET Client Profile is a subset of the .NET Framework that was provided with .NET Framework 4 and earlier versions and was optimized for client applications. The .NET Framework 4 and earlier versions provided two deployment options: the full .NET Framework and the Client Profile. The Client Profile enabled faster deployment and smaller app installation packages than the full .NET Framework. Starting with the .NET Framework 4.5, the Client Profile has been discontinued and only the full redistributable package is available. Optimizations provided by the .NET Framework 4.5, such as smaller download size and faster deployment, have eliminated the need for a separate deployment package." - http://msdn.microsoft.com/en-us/library/cc656912.aspx

Full Installer

<package id="dotnetfx45" name="Microsoft .NET Framework 4.5" revision="1" priority="0" >

<check type='logical' condition='or'>
   <check type="uninstall" condition="exists" path="Microsoft .NET Framework 4.5.*" />
</check>

<install cmd='xcopy "%SOFTWARE%\net\dotNetFx45_Full_x86_x64.exe" c:\dotNetInstallers\ /c /r /y /q' />

<install cmd='c:\dotNetInstallers\dotNetFx45_Full_x86_x64.exe /norestart /passive' >
   <exit code="0" />
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

<install cmd='%comspec% /c del /S /Q "c:\dotNetInstallers" > nul' />
 
<upgrade include="install" />  
 
<remove cmd='MsiExec.exe /qn /X{1AD147D0-BE0E-3D6C-AC11-64F6DC4163F1}' />
 
</package>

Another option. This script verifies that .NET 4.5 is installed with PowerShell by checking the release as specified by Microsoft. This is the package referenced by the Windows Management Framework package.

<?xml version="1.0" encoding="UTF-8"?>

<packages>

    <package
		id="microsoft-dotnet45"
		name="Microsoft .NET Framework 4.5.2"
		revision="4.5.2"
		priority="50" >
 
		<check type="execute" path="powershell.exe -Command &quot;&amp;{ exit ( Get-ChildItem -Path &apos;HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full&apos; | Foreach-Object { $_.GetValue( &apos;Release&apos; ) } | ForEach-Object { $_ -ge 378389 } ) }&quot;" condition="exitcodeequalto" value="1" />
	 
		<install cmd='"%SOFTWARE%\Microsoft\DotNet-4.5.2\NDP452-KB2901907-x86-x64-AllOS-ENU.exe" /norestart /passive' >
		   <exit code="0" />
		   <exit code="194" reboot="true" />
		   <exit code="1603" />
		   <exit code="3010" reboot="true" />
		</install>
	 
		<upgrade include="install" />
	 
	</package>

</packages>

Language Pack

<package id="dotnetfx45lp" name="Microsoft .NET Framework 4.5 Language Pack DE" revision="1" priority="0" >

<depends package-id="dotnetfx45"/>

<check type='logical' condition='or'>
   <check type="uninstall" condition="exists" path="Microsoft .NET Framework 4.5 DEU Language Pack" />
</check>

<install cmd='xcopy "%SOFTWARE%\net\dotNetFx45LP_Full_x86_x64de.exe" c:\dotNetInstallers\ /c /r /y /q' />

<install cmd='c:\dotNetInstallers\dotNetFx45LP_Full_x86_x64de.exe /norestart /passive' >
   <exit code="0" />
   <exit code="194" reboot="true" />
   <exit code="1603" />
   <exit code="3010" reboot="true" />
</install>

<install cmd='%comspec% /c del /S /Q "c:\dotNetInstallers" > nul' />
 
<upgrade include="install" />  
 
<remove cmd='MsiExec.exe /qn /X{1AD147D0-BE0E-3D6C-AC11-64F6DC4163F1}' />
 
</package>

Microsoft .NET Framework 2 and 3 for Windows 10

  • Have an ISO for Win10 available on the network
  • This package will do the same as enabling dotnet 2 and 3 from the Control Panel/Add-Remove programs/Enable-disable windows features
<package id="dotnet-10" name="Microsoft .NET Framework 2.0 and 3.5 for W10"> 
  <variable name="pkgname" value="Microsoft .NET Framework 2.0 and 3.5 for W10" />
  <variable name="PKG_VERSION"        value="201509040904" />    
  <variable name="PKG_SOURCE"         value="\\172.16.1.10\Temporary\ISO\Windows10\Windows10ProEnUSx64"/><!-- downloaded W10x64 ISO any language -->
  <variable name="PKG_EXE_NAME"       value="dotnetfx2.exe" />
  
  <check type="logical" condition="or">
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 2" /> 
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0 Service Pack 1" /> 
    <check type="uninstall" condition="exists" path="Microsoft .NET Framework 2.0" />
    <check type='file' condition='exists' path='%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe' />
  </check>
 
  <install cmd='Dism /online /enable-feature /featurename:NetFX3 /All /Source:"%PKG_SOURCE%\sources\sxs" /LimitAccess' architecture="x64">
    <exit code="any" />
  </install> 
</package>