winutil/functions/private/Install-WinUtilProgramWinget.ps1
Chris Titus 5dfa540c85
2023-09-13 September Bug fixes and Feature Additions (#1024)
* Add Message confirming restore point created (#953)

* Compile Winutil

* readme update

* Fix value for strings

* remove idm paid software

* add xdm

* add peazip

* Update winutil.ps1

* cleanup and tcpview addition

* fix choco wiztree

* Update tweaks.json

* Add CTT YouTube tutorial video to the README (#1007)

* Update edgeremoval.bat (#1009)

Update Edge Removal - AveYo to 2023.09.09

* Update README.md update docs

* Application Sort - DDU - Change in Runspace (#1013)

* Application list sorted alphabetically

* Indentation fix

* Compiled winutil.ps1

* Indentation fix

* Added Display Driver Uninstaller

* Fix apps falsely marked as installed #1015

* Fix new golang package

* music bee add #993

* Compile Winutil

* Cleanup Tweaks

* Compile Winutil

* OneDrive Removal Fix #385

* Compile Winutil

* Expand Common Issues in Readme

* one drive cleanup fixes

* Compile Winutil

* OneDrive Reinstall

* Compile Winutil

* Edge undo change

* Compile Winutil

* Revert "Merge branch 'test-2023-08-09' into 2023-09-07-Test"

This reverts commit 3636dcb4bb, reversing
changes made to db4f4925d2.

* rebase fix 1

* Musicbee

* uninstall fix

* Update README.md

* fix reinstalls on edge onedrive

* Update winutil.ps1

* Display tweak unpin icons

* Added tweaks for IPv6 (#1010)

* ipv6 merge

---------

Co-authored-by: Stephen Harris <stephen@lunamile.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: meenbeese <meenbeese@tutanota.com>
Co-authored-by: Christian S <crian84@gmail.com>
Co-authored-by: supplefrog <78985073+supplefrog@users.noreply.github.com>
Co-authored-by: Joan Solana Raduà <joansolana@proton.me>
2023-09-13 17:30:56 -05:00

38 lines
1.2 KiB
PowerShell

Function Install-WinUtilProgramWinget {
<#
.DESCRIPTION
This will install programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
Note the triple quotes are required any time you need a " in a normal script block.
#>
param(
$ProgramsToInstall,
$manage = "Installing"
)
$x = 0
$count = $($ProgramsToInstall -split ",").Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Foreach ($Program in $($ProgramsToInstall -split ",")){
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
}
if($manage -eq "Uninstalling"){
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
}
$X++
}
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
}