mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-16 23:55:50 -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
|
||
|
|
||
|
}
|