14
edits
Changes
→Full Installer
</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 "&{ exit ( Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' | Foreach-Object { $_.GetValue( 'Release' ) } | ForEach-Object { $_ -ge 378389 } ) }"" 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>