mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
d46d324df8
* Cleanup programs install * Update Install-WinUtilProgramChoco.ps1
17 lines
551 B
PowerShell
17 lines
551 B
PowerShell
Function Install-WinUtilProgramWinget {
|
|
param (
|
|
[Parameter(Mandatory=$true)]
|
|
[ValidateSet("Install", "Uninstall")]
|
|
[string]$Action,
|
|
|
|
[Parameter(Mandatory=$true)]
|
|
[string[]]$Programs
|
|
)
|
|
|
|
if ($Action -eq 'Install') {
|
|
Start-Process -FilePath winget -ArgumentList "install $Programs --accept-package-agreements --source winget --silent" -NoNewWindow -Wait
|
|
} else {
|
|
Start-Process -FilePath winget -ArgumentList "uninstall $Programs --source winget --silent" -NoNewWindow -Wait
|
|
}
|
|
}
|