Prevent reboots during installation
This commit is contained in:
parent
594e495e47
commit
cb3707f8a0
|
@ -27,7 +27,7 @@ Start-SoftwareInstaller @parameters -Installer {
|
|||
if (-not (& { powershell -Command "Import-Module $module"; $?; })) {
|
||||
$feature = "NetFx3";
|
||||
|
||||
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
||||
if ((Get-WindowsOptionalFeature -Online -NoRestart -FeatureName $feature).State -ne "Enabled") {
|
||||
Write-Host "Enabling ``$feature`` feature…";
|
||||
choco install --source windowsFeatures -y $feature;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue