Use /DEPENDENTS instead of /IMPORTS in applocal.ps1

This commit is contained in:
Alexander Karatarakis 2016-11-08 19:02:59 -08:00
parent bed9b07a83
commit 097626c317

View File

@ -5,7 +5,7 @@ function resolve($targetBinary) {
$targetBinaryPath = Resolve-Path $targetBinary $targetBinaryPath = Resolve-Path $targetBinary
$targetBinaryDir = Split-Path $targetBinaryPath -parent $targetBinaryDir = Split-Path $targetBinaryPath -parent
$a = $(link /dump /imports $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" })
$a | % { $a | % {
if (Test-Path "$installedDir\$_") { if (Test-Path "$installedDir\$_") {
if (Test-Path "$targetBinaryDir\$_") { if (Test-Path "$targetBinaryDir\$_") {