mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Update find_vstool.ps1
add vs2022 cert thunbprint fix function which tests if a file is executable
This commit is contained in:
@@ -19,9 +19,12 @@ function EditBinCertificateIsValid() {
|
||||
"3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC",
|
||||
"98ED99A67886D020C564923B7DF25E9AC019DF26",
|
||||
"108E2BA23632620C427C570B6D9DB51AC31387FE",
|
||||
"5EAD300DC7E4D637948ECB0ED829A072BD152E17"
|
||||
"5EAD300DC7E4D637948ECB0ED829A072BD152E17",
|
||||
"97221B97098F37A135DCC212E2B41E452BCE51F2"
|
||||
)
|
||||
$file_signature = Get-AuthenticodeSignature -FilePath $Path
|
||||
write-host "Path: $Path"
|
||||
Write-Host "file_signature.SignerCertificate.Thumbprint: $($file_signature.SignerCertificate.Thumbprint)"
|
||||
if (($file_signature.Status -ne "Valid") -or ($valid_microsoft_cert_thumbprints -notcontains $file_signature.SignerCertificate.Thumbprint)) {
|
||||
Write-Warning "Could not validate the signature of $Path"
|
||||
return $false
|
||||
@@ -36,8 +39,7 @@ function ToolCanBeExecuted {
|
||||
[string]
|
||||
$Path
|
||||
)
|
||||
$null = & $Path
|
||||
Write-Output ($LASTEXITCODE -gt 0)
|
||||
$env:PATHEXT.Contains((Get-Item $Path).Extension.ToUpper())
|
||||
}
|
||||
|
||||
$rootSearchPaths = @(
|
||||
|
||||
Reference in New Issue
Block a user