As the title says, I want to get it with a batch file; using a third-party tool is also fine.
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
@echo off
::Use wmic to get version information for a non-system program (using Thunder as an example)
for /f "skip=1 delims=" %%i in ('wmic datafile where "Name='C:\\Program Files\\Thunder
Network\\Thunder\\Thunder.exe'" get Version') do (echo version obtained with wmic:%%i)
::Use the registry to get version information for a non-system program (using Thunder as an example)
for /f "skip=4 tokens=3" %%i in ('reg query "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v
Version') do (echo version obtained from registry:%%i)
::Result
::version obtained with wmic:5, 6, 8, 19
::version obtained from registry:5.8.3.556
::Personally I think the version obtained from the registry is more accurate; maybe the two represent the data differently
pause
wmic datafile where name="c:\\program files\\thunder network\\thunder\\thunder.exe" list full /format:hform >d.html&d.html