Files
mRemoteNG/Tools/verify_LargeAddressAware.ps1
2017-04-21 17:20:23 -04:00

32 lines
645 B
PowerShell

param (
[string]
[Parameter(Mandatory=$true)]
$TargetDir,
[string]
[Parameter(Mandatory=$true)]
$TargetFileName
)
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
# Find editbin.exe
$path_dumpBin = & "$PSScriptRoot\find_vstool.ps1" -FileName "dumpbin.exe"
$path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
# Dump exe header
$output = & "$path_dumpBin" /NOLOGO /HEADERS $path_outputExe | Select-String large
if ($output -eq $null)
{
Write-Warning "Could not validate LargeAddressAware"
}
else
{
Write-Output $output.ToString().TrimStart(" ")
}
Write-Output ""