This repository was archived by the owner on Feb 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the Windows Feature list as a Chocolatey feed
- Loading branch information
Showing
12 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
function Chocolatey-WindowsFeatures { | ||
param( | ||
[string] $packageName | ||
) | ||
Write-Debug "Running 'Chocolatey-WindowsFeatures' for $packageName with installerArguments:`'$installerArguments`'"; | ||
|
||
@" | ||
$h1 | ||
Chocolatey ($chocVer) is installing `'$packageName`' (from Windows Veatures).. | ||
$h1 | ||
"@ | Write-Host | ||
|
||
$chocoInstallLog = Join-Path $nugetChocolateyPath 'chocolateyWindowsFeaturesInstall.log'; | ||
Remove-LastInstallLog $chocoInstallLog | ||
|
||
$packageArgs = "/c DISM /Online /NoRestart /Enable-Feature /all /FeatureName:$packageName" | ||
|
||
Write-Host "Opening minimized PowerShell window and calling `'cmd.exe $packageArgs`'. If progress is taking a long time, please check that window. It also may not be 100% silent..." | ||
$statements = "cmd.exe $packageArgs | Tee-Object -FilePath `'$chocoInstallLog`';" | ||
Start-ChocolateyProcessAsAdmin "$statements" -minimized -nosleep | ||
|
||
Create-InstallLogIfNotExists $chocoInstallLog | ||
$installOutput = Get-Content $chocoInstallLog -Encoding Ascii | ||
foreach ($line in $installOutput) { | ||
Write-Host $line | ||
} | ||
|
||
@" | ||
$h1 | ||
Chocolatey has finished installing `'$packageName`' - check log for errors. | ||
$h1 | ||
"@ | Write-Host | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function Chocolatey-WindowsFeatures { | ||
param( | ||
[string] $packageName | ||
) | ||
$script:chocolatey_windowsfeatures_was_called = $true | ||
$script:packageName = $packageName | ||
|
||
if ($script:exec_chocolatey_windowsfeatures_actual) { Chocolatey-WindowsFeatures-Actual @PSBoundParameters} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters