Compare commits

..

1 Commits

3 changed files with 8 additions and 22 deletions

View File

@ -2934,13 +2934,5 @@
"description": "Fork - a fast and friendly git client.", "description": "Fork - a fast and friendly git client.",
"link": "https://git-fork.com/", "link": "https://git-fork.com/",
"winget": "Fork.Fork" "winget": "Fork.Fork"
},
"ZenBrowser": {
"category": "Browsers",
"choco": "na",
"content": "Zen Browser",
"description": "The modern, privacy-focused, performance-driven browser built on Firefox",
"link": "https://zen-browser.app/",
"winget": "Zen-Team.Zen-Browser"
} }
} }

View File

@ -56,7 +56,7 @@ function Test-WinUtilPackageManager {
# Check if Winget's Version is too old. # Check if Winget's Version is too old.
$wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v')) $wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v'))
# Grabs the latest release of Winget from the Github API for version check process. # Grabs the latest release of Winget from the Github API for version check process.
$response = winget search -e Microsoft.AppInstaller --accept-source-agreements $response = winget search -e Microsoft.AppInstaller
$wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value $wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value
Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White
Write-Host "Current Installed Version: $wingetCurrentVersion" -ForegroundColor White Write-Host "Current Installed Version: $wingetCurrentVersion" -ForegroundColor White

View File

@ -54,27 +54,21 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
$PSBoundParameters.GetEnumerator() | ForEach-Object { $PSBoundParameters.GetEnumerator() | ForEach-Object {
$argList += if ($_.Value -is [switch] -and $_.Value) { $argList += if ($_.Value -is [switch] -and $_.Value) {
"-$($_.Key)" "-$($_.Key)"
} elseif ($_.Value -is [array]) {
"-$($_.Key) $($_.Value -join ',')"
} elseif ($_.Value) { } elseif ($_.Value) {
"-$($_.Key) '$($_.Value)'" "-$($_.Key) `"$($_.Value)`""
} }
} }
$script = if ($PSCommandPath) { $script = if ($MyInvocation.MyCommand.Path) {
"& { & `'$($PSCommandPath)`' $($argList -join ' ') }" "& { & '$($MyInvocation.MyCommand.Path)' $argList }"
} else { } else {
"&([ScriptBlock]::Create((irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1))) $($argList -join ' ')" "iex '& { $(irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1) } $argList'"
} }
$powershellCmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" } $powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { "$powershellCmd" } $processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
if ($processCmd -eq "wt.exe") { Start-Process $processCmd -ArgumentList "$powershellcmd -ExecutionPolicy Bypass -NoProfile -Command $script" -Verb RunAs
Start-Process $processCmd -ArgumentList "$powershellCmd -ExecutionPolicy Bypass -NoProfile -Command `"$script`"" -Verb RunAs
} else {
Start-Process $processCmd -ArgumentList "-ExecutionPolicy Bypass -NoProfile -Command `"$script`"" -Verb RunAs
}
break break
} }