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.
|
# Initialise empty arrays.
|
||||||
$exeNames = @()
|
$exeNames = @()
|
||||||
$exePaths = @()
|
$exePaths = @()
|
||||||
|
$validPaths = @()
|
||||||
|
|
||||||
# Query windows registry for unique installed executable files.
|
# Query windows registry for unique installed executable files.
|
||||||
$exePaths = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\*" |
|
$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.
|
# Get corresponding application names for unique installed executable files.
|
||||||
foreach ($exePath in $exePaths) {
|
foreach ($exePath in $exePaths) {
|
||||||
if (Test-Path -Path $exePath) {
|
if (Test-Path -Path $exePath) {
|
||||||
|
$validPaths += $exePath
|
||||||
$exeNames += GetApplicationName -exePath $exePath
|
$exeNames += GetApplicationName -exePath $exePath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process extracted executable file paths.
|
# Process extracted executable file paths.
|
||||||
PrintArrayData -Names $exeNames -Paths $exePaths -Source "winreg"
|
PrintArrayData -Names $exeNames -Paths $validPaths -Source "winreg"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Name: 'AppSearchUWP'
|
# Name: 'AppSearchUWP'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user