sigcheck -a -q %windir%\system32\mstsc.exe
- si es necesario, agregue MD5, SHA1, PESHA1, SHA256
sigcheck -a -q -h %windir%\system32\mstsc.exe
- Versión de prueba y comando de ejecución:
sigcheck -a -q %windir%\system32\mstsc.exe | find "Prod version:" | find "6.0.6001.18564" && Echo "RDP 6.0.6001.18564"
filever - Herramientas de soporte:
De Windows XP Service Pack 2 herramientas de soporte o
Windows Server 2003 Service Pack 2 Herramientas de soporte de 32 bits
filever /V %windir%\system32\mstsc.exe
var 2:
filever /V %windir%\system32\mstsc.exe | findstr "FileDesc Version"
filever /V %windir%\system32\mstsc.exe | findstr "ProductVersion" | find "6.0.6001.18564" && Echo "RDP 6.0.6001.18564"
filever /V %windir%\system32\mstsc.exe | findstr "ProductVersion" | find "6.0.6001.18564" || Echo "NOT 6.0.6001.18564"
wmic:
wmic datafile where "name='C:\\<windows dir>\\system32\\mstsc.exe'" get version
Potencia Shell:
Descripción del archivo:
powershell (gi %windir%\system32\mstsc.exe).versioninfo.FileDescription
versión:
powershell (gi %windir%\system32\mstsc.exe).versioninfo ^|Ft -Au
versión de script comparar:
$VerArr = [version]"8.2.6001.18564", [version]"6.0.6001.18564"
[version]$v1="8.2.6001.18564"
[version]$v2="6.0.6001.18564"
[version]$v3=(gi $env:windir\system32\mstsc.exe).versioninfo.ProductVersion
$v3
$v3 -ge $v1
$v3 -ge $v2
If ($VerArr -contains $v3)
{
echo 'Run version list block'
}
salida:
Major Minor Build Revision
----- ----- ----- --------
6 0 6001 18564
False
True
Run version list block
WSH:
cscript //Nologo vers01.vbs
vers01.vbs:
WScript.Echo CreateObject("Scripting.FileSystemObject").GetFileVersion(CreateObject("WScript.Shell").Environment("Process")("WINDIR") & "\system32\mstsc.exe")
JScript:
cscript //Nologo vers01.js
vers01.js:
WScript.Echo(new ActiveXObject("Scripting.FileSystemObject").GetFileVersion(new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%windir%")+"//system32//mstsc.exe"));
instalación de pefile modyle: descomprimir, ejecutar python setup.py install
import pefile, os
pe = pefile.PE(os.path.join(os.environ['WINDIR'],'system32\mstsc.exe'))
ProductVersion = pe.FileInfo[0].StringTable[0].entries['ProductVersion']
print ProductVersion
PHP:
php vers01.php
php.ini ( %windir%
):
extension_dir = C:\php\ext\
[COM_DOT_NET]
extension=php_com_dotnet.dll
vers01.php:
<?php
$path = getenv('SystemRoot').'\\system32\\mstsc.exe';
$fso = new COM("Scripting.FileSystemObject");
echo $fso->GetFileVersion($path);
?>
Perl:
Instale el módulo Win32 :: File :: VersionInfo: cpan Win32::File::VersionInfo
use Win32::File::VersionInfo;
$fn=$ENV{windir} . "\\system32\\mstsc.exe";
$fl=GetFileVersionInfo($fn);
if($fl){print $fl->{FileVersion},"\n";}