LoginSignup
2
3

More than 5 years have passed since last update.

EXEファイルのバージョン情報を表示(IronPython)

Posted at

すまん、PowerShell はサポート範囲外なんだ。それゆえ、バッチ+IronPython で:

showver.cmd
@ipy -x "%~f0" %1 %2 %3 %4 %5 %6 %7 %8 %9 & exit /b

import System
import sys

for path1 in sys.argv[1:]:
    vi = System.Diagnostics.FileVersionInfo.GetVersionInfo(path1)
    if vi is None:
        continue
    print vi.FileVersion,vi.ProductVersion

# vim:set ft=python:

実行結果:

<MARKEDONE:~/bin>
✏ showver lua52.dll
5.2.3 5.2.3
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3