sigcheck -a -q %windir%\system32\mstsc.exe
-MD5, SHA1, PESHA1, SHA256을 추가해야하는 경우
sigcheck -a -q -h %windir%\system32\mstsc.exe
-테스트 버전 및 명령 실행 :
sigcheck -a -q %windir%\system32\mstsc.exe | find "Prod version:" | find "6.0.6001.18564" && Echo "RDP 6.0.6001.18564"
filever-지원 도구 :
Windows XP 서비스 팩 2 지원 도구 또는
Windows Server 2003 서비스 팩 2 32 비트 지원 도구
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 (gi %windir%\system32\mstsc.exe).versioninfo.FileDescription
버전:
powershell (gi %windir%\system32\mstsc.exe).versioninfo ^|Ft -Au
스크립트 버전 비교 :
$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'
}
산출:
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"));
pefile modyle 설치 : 압축 해제, 실행 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);
?>
펄 :
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";}