Slight comment adjustments

This commit is contained in:
Rohan Barar 2024-08-03 21:46:57 +10:00
parent bd0d3479b9
commit 701ad3ae0a

View File

@ -57,9 +57,6 @@ function PrintArrayData {
[string]$Source [string]$Source
) )
# Remove leading and trailing double quotes from all paths.
$Paths = $Paths -replace '^"*|"*$'
# Combine the arrays into an array of objects # Combine the arrays into an array of objects
$NamesandPaths = @() $NamesandPaths = @()
for ($i = 0; $i -lt $Names.Length; $i++) { for ($i = 0; $i -lt $Names.Length; $i++) {
@ -177,6 +174,8 @@ function GetUWPExecutablePath {
return $null return $null
} }
# Name: 'AppSearchWinReg'
# Role: Search the Windows Registry for installed applications.
function AppSearchWinReg { function AppSearchWinReg {
# Initialise empty arrays. # Initialise empty arrays.
$exeNames = @() $exeNames = @()
@ -242,8 +241,9 @@ function AppSearchUWP {
PrintArrayData -Names $exeNames -Paths $exePaths -Source "uwp" PrintArrayData -Names $exeNames -Paths $exePaths -Source "uwp"
} }
# Name: 'AppSearchWinReg'
# Role: Search for chocolatey shims.
function AppSearchChocolatey { function AppSearchChocolatey {
# Note: This will only look for chocolatey shims!
# Initialise empty arrays. # Initialise empty arrays.
$exeNames = @() $exeNames = @()
$exePaths = @() $exePaths = @()
@ -273,6 +273,8 @@ function AppSearchChocolatey {
} }
} }
# Name: 'AppSearchWinReg'
# Role: Search for scoop shims.
function AppSearchScoop { function AppSearchScoop {
# Initialise empty arrays. # Initialise empty arrays.
$exeNames = @() $exeNames = @()
@ -322,12 +324,12 @@ function AppSearchScoop {
### SEQUENTIAL LOGIC ### ### SEQUENTIAL LOGIC ###
# Print bash commands to define three new arrays. # Print bash commands to define three new arrays.
"NAMES=()" Write-Output 'NAMES=()'
"ICONS=()" Write-Output 'EXES=()'
"EXES=()" Write-Output 'ICONS=()'
# Search for installed applications. # Search for installed applications.
AppSearchWinReg AppSearchWinReg # Windows Registry
AppSearchUWP AppSearchUWP # Universal Windows Platform
AppSearchChocolatey AppSearchChocolatey # Chocolatey Package Manager
AppSearchScoop AppSearchScoop # Scoop Package Manager