From 701ad3ae0a460e8404d82f698cd7c665d7623c63 Mon Sep 17 00:00:00 2001 From: Rohan Barar Date: Sat, 3 Aug 2024 21:46:57 +1000 Subject: [PATCH] Slight comment adjustments --- install/ExtractPrograms.ps1 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/install/ExtractPrograms.ps1 b/install/ExtractPrograms.ps1 index 53549ce..b1587ea 100644 --- a/install/ExtractPrograms.ps1 +++ b/install/ExtractPrograms.ps1 @@ -57,9 +57,6 @@ function PrintArrayData { [string]$Source ) - # Remove leading and trailing double quotes from all paths. - $Paths = $Paths -replace '^"*|"*$' - # Combine the arrays into an array of objects $NamesandPaths = @() for ($i = 0; $i -lt $Names.Length; $i++) { @@ -177,6 +174,8 @@ function GetUWPExecutablePath { return $null } +# Name: 'AppSearchWinReg' +# Role: Search the Windows Registry for installed applications. function AppSearchWinReg { # Initialise empty arrays. $exeNames = @() @@ -242,8 +241,9 @@ function AppSearchUWP { PrintArrayData -Names $exeNames -Paths $exePaths -Source "uwp" } +# Name: 'AppSearchWinReg' +# Role: Search for chocolatey shims. function AppSearchChocolatey { - # Note: This will only look for chocolatey shims! # Initialise empty arrays. $exeNames = @() $exePaths = @() @@ -273,6 +273,8 @@ function AppSearchChocolatey { } } +# Name: 'AppSearchWinReg' +# Role: Search for scoop shims. function AppSearchScoop { # Initialise empty arrays. $exeNames = @() @@ -322,12 +324,12 @@ function AppSearchScoop { ### SEQUENTIAL LOGIC ### # Print bash commands to define three new arrays. -"NAMES=()" -"ICONS=()" -"EXES=()" +Write-Output 'NAMES=()' +Write-Output 'EXES=()' +Write-Output 'ICONS=()' # Search for installed applications. -AppSearchWinReg -AppSearchUWP -AppSearchChocolatey -AppSearchScoop +AppSearchWinReg # Windows Registry +AppSearchUWP # Universal Windows Platform +AppSearchChocolatey # Chocolatey Package Manager +AppSearchScoop # Scoop Package Manager