mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-23 22:53:02 +02:00
Revise Exec Path Check in ExtractPrograms.ps1
This commit is contained in:
parent
e224e233cc
commit
3a0acff38f
@ -180,6 +180,7 @@ function AppSearchWinReg {
|
||||
# Initialise empty arrays.
|
||||
$exeNames = @()
|
||||
$exePaths = @()
|
||||
$validPaths = @()
|
||||
|
||||
# Query windows registry for unique installed executable files.
|
||||
$exePaths = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\*" |
|
||||
@ -193,12 +194,13 @@ function AppSearchWinReg {
|
||||
# Get corresponding application names for unique installed executable files.
|
||||
foreach ($exePath in $exePaths) {
|
||||
if (Test-Path -Path $exePath) {
|
||||
$validPaths += $exePath
|
||||
$exeNames += GetApplicationName -exePath $exePath
|
||||
}
|
||||
}
|
||||
|
||||
# Process extracted executable file paths.
|
||||
PrintArrayData -Names $exeNames -Paths $exePaths -Source "winreg"
|
||||
PrintArrayData -Names $exeNames -Paths $validPaths -Source "winreg"
|
||||
}
|
||||
|
||||
# Name: 'AppSearchUWP'
|
||||
|
Loading…
x
Reference in New Issue
Block a user