sigcheck -a -q %windir%\system32\mstsc.exe
- si besoin ajouter MD5, SHA1, PESHA1, SHA256
sigcheck -a -q -h %windir%\system32\mstsc.exe
- testez la version et exécutez la commande:
sigcheck -a -q %windir%\system32\mstsc.exe | find "Prod version:" | find "6.0.6001.18564" && Echo "RDP 6.0.6001.18564"
filever - Outils d'assistance:
Outils de support de Windows XP Service Pack 2 ou
Outils de support de Windows Server 2003 Service Pack 2 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
Powershell:
Description du fichier:
powershell (gi %windir%\system32\mstsc.exe).versioninfo.FileDescription
version:
powershell (gi %windir%\system32\mstsc.exe).versioninfo ^|Ft -Au
comparer la version du script:
$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'
}
production:
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"));
installation du style pefile: Décompressez, exécutez 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:
Installez le module 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";}