mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Merge branch 'test-2024-04-20-2' of https://github.com/ChrisTitusTech/winutil into test-2024-04-20-2
This commit is contained in:
commit
84fe67f032
11
winutil.ps1
11
winutil.ps1
@ -845,6 +845,8 @@ function Install-WinUtilWinget {
|
||||
Write-Host "Failure detected while installing via GitHub method. Continuing with Chocolatey method as fallback." -ForegroundColor Red
|
||||
# In case install fails via GitHub method.
|
||||
Try {
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install winget-cli"
|
||||
Write-Host "Winget Installed" -ForegroundColor Green
|
||||
Write-Output "Refreshing Environment Variables...`n"
|
||||
@ -3228,7 +3230,8 @@ function Invoke-WPFFixesWinget {
|
||||
.DESCRIPTION
|
||||
BravoNorris for the fantastic idea of a button to reinstall winget
|
||||
#>
|
||||
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
||||
|
||||
}
|
||||
@ -3357,6 +3360,8 @@ function Invoke-WPFGetIso {
|
||||
# you consent to downloading it, no need to show extra dialogs
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
||||
# the step below needs choco to download oscdimg
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
||||
Write-Host "choco on system: $chocoFound"
|
||||
if (!$chocoFound)
|
||||
@ -13704,8 +13709,8 @@ Invoke-WPFRunspace -ScriptBlock {
|
||||
# Print the logo
|
||||
Invoke-WPFFormVariables
|
||||
|
||||
# Check if Chocolatey is installed
|
||||
Install-WinUtilChoco
|
||||
# Install Winget if not already present
|
||||
Install-WinUtilWinget
|
||||
|
||||
# Set the titlebar
|
||||
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
||||
|
Loading…
Reference in New Issue
Block a user