mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 06:35:51 -06:00
22 lines
606 B
PowerShell
22 lines
606 B
PowerShell
|
Function Update-WinUtilProgramWinget {
|
||
|
|
||
|
<#
|
||
|
|
||
|
.DESCRIPTION
|
||
|
This will update programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
||
|
|
||
|
#>
|
||
|
|
||
|
[ScriptBlock]$wingetinstall = {
|
||
|
|
||
|
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
||
|
|
||
|
Start-Transcript $ENV:TEMP\winget-update.log -Append
|
||
|
winget upgrade --all
|
||
|
|
||
|
Pause
|
||
|
}
|
||
|
|
||
|
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
|
||
|
|
||
|
}
|