开发者

Is there any MS-DOS command to get the version of an executable (or dll) file?

Is there any MS-DOS command to ge开发者_Python百科t the version of am executable (or dll) file?


Of course there is a simple command ;-)

wmic /node:"servername" datafile where name='c:\\Program Files (x86)\\Symantec\\Symantec Endpoint Protection\\smc.exe' get version

you can ommit /node to perform check on the local computer. And if you ommit "get version" you get all the values and column names. Of course there are standard wmic parameters available like /output:filename, /append:filename or /format:csv and you can use @list.txt instead of a server name to perform check on list of machines.


Either user powershell see Get file version in PowerShell

or Windows Explorer

or write your own utility, I don't think that MSDOS supports this natively.


You could load the executable as a binary file and read the PE headers manually...

http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx


You can try Resource Hacker with the following syntax:

reshack.exe -extract "path\to\my\file.dll," ver.rc, VERSIONINFO, , && findstr FILEVERSION ver.rc

Beware of commas. Make sure you can create ver.rc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜