Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba5120b9de |
+25
@@ -56,6 +56,13 @@ $windowsDirectories = @(
|
|||||||
(Join-Path $env:WINDIR "SysWOW64")
|
(Join-Path $env:WINDIR "SysWOW64")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$windowsKitsDirectories = @(
|
||||||
|
"${env:ProgramFiles(x86)}\Windows Kits",
|
||||||
|
"$env:ProgramFiles\Windows Kits"
|
||||||
|
) | Where-Object {
|
||||||
|
$_ -and (Test-Path $_)
|
||||||
|
}
|
||||||
|
|
||||||
$processed = @{}
|
$processed = @{}
|
||||||
|
|
||||||
function Test-IsWindowsSystemDll {
|
function Test-IsWindowsSystemDll {
|
||||||
@@ -63,6 +70,10 @@ function Test-IsWindowsSystemDll {
|
|||||||
[string]$Name
|
[string]$Name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($Name -like "api-ms-win-*.dll") {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($directory in $windowsDirectories) {
|
foreach ($directory in $windowsDirectories) {
|
||||||
$path = Join-Path $directory $Name
|
$path = Join-Path $directory $Name
|
||||||
|
|
||||||
@@ -71,6 +82,20 @@ function Test-IsWindowsSystemDll {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($directory in $windowsKitsDirectories) {
|
||||||
|
$match = Get-ChildItem `
|
||||||
|
-Path $directory `
|
||||||
|
-Filter $Name `
|
||||||
|
-File `
|
||||||
|
-Recurse `
|
||||||
|
-ErrorAction SilentlyContinue |
|
||||||
|
Select-Object -First 1
|
||||||
|
|
||||||
|
if ($match) {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user