mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 14:18:31 +00:00
* cleaned up typo, fixes, grammatical and other related fixes (#2) * typo in Lightshot app name * remove trailing comma in applications.json * consistent capitalization of Windows, WinGet - only user-facing text - includes update to devdocs-generator.ps1, so docs for tweaks modifying registry will have `Windows settings` rather than `windows settings` * various fixes for typos, style, punctuation and capitalization * capitalize 'AM' * Update README.md change formatting for GitHub UI interaction form code format (` `) to bold md Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com> * typos and wording in docs --------- Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com>
50 lines
1.8 KiB
PowerShell
50 lines
1.8 KiB
PowerShell
function Test-WinUtilPackageManager {
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Checks if WinGet and/or Choco are installed
|
|
|
|
.PARAMETER winget
|
|
Check if WinGet is installed
|
|
|
|
.PARAMETER choco
|
|
Check if Chocolatey is installed
|
|
|
|
#>
|
|
|
|
Param(
|
|
[System.Management.Automation.SwitchParameter]$winget,
|
|
[System.Management.Automation.SwitchParameter]$choco
|
|
)
|
|
|
|
if ($winget) {
|
|
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
|
Write-Host "===========================================" -ForegroundColor Green
|
|
Write-Host "--- WinGet is installed ---" -ForegroundColor Green
|
|
Write-Host "===========================================" -ForegroundColor Green
|
|
$status = "installed"
|
|
} else {
|
|
Write-Host "===========================================" -ForegroundColor Red
|
|
Write-Host "--- WinGet is not installed ---" -ForegroundColor Red
|
|
Write-Host "===========================================" -ForegroundColor Red
|
|
$status = "not-installed"
|
|
}
|
|
}
|
|
|
|
if ($choco) {
|
|
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
|
Write-Host "===========================================" -ForegroundColor Green
|
|
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
|
|
Write-Host "===========================================" -ForegroundColor Green
|
|
$status = "installed"
|
|
} else {
|
|
Write-Host "===========================================" -ForegroundColor Red
|
|
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
|
|
Write-Host "===========================================" -ForegroundColor Red
|
|
$status = "not-installed"
|
|
}
|
|
}
|
|
|
|
return $status
|
|
}
|