mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 22:27:28 +00:00
Cleanup winget upgrade (#4410)
* Update Update-WinUtilProgramWinget.ps1 * Delete functions/private/Update-WinUtilProgramWinget.ps1 * Delete functions/private/Get-WinUtilInstallerProcess.ps1 * Update Invoke-WPFInstallUpgrade.ps1 * Update Invoke-WPFInstallUpgrade.ps1 * Update Invoke-WPFInstallUpgrade.ps1 * Update Invoke-WPFInstallUpgrade.ps1 * Update Invoke-WPFInstallUpgrade.ps1 * Update Invoke-WPFInstallUpgrade.ps1
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
function Get-WinUtilInstallerProcess {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Checks if the given process is running
|
||||
|
||||
.PARAMETER Process
|
||||
The process to check
|
||||
|
||||
.OUTPUTS
|
||||
Boolean - True if the process is running
|
||||
|
||||
#>
|
||||
|
||||
param($Process)
|
||||
|
||||
if ($Null -eq $Process) {
|
||||
return $false
|
||||
}
|
||||
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue) {
|
||||
return $true
|
||||
}
|
||||
return $false
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
Function Update-WinUtilProgramWinget {
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This will update all programs using WinGet
|
||||
|
||||
#>
|
||||
|
||||
[ScriptBlock]$wingetinstall = {
|
||||
|
||||
$host.ui.RawUI.WindowTitle = """WinGet Install"""
|
||||
|
||||
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
|
||||
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
|
||||
|
||||
}
|
||||
|
||||
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user