How to get the File Description of a DLL or EXE

帅比萌擦擦* 提交于 2019-12-07 07:48:08

问题


I am creating a program that among other things is going to control Services. I am attempting to list the Services similar to the way they are listed in msconfig (the first window below).

I found where the services are listed in the registry. In Vista and Win7 the DisplayName and Description are often references. For example @%SystemRoot%\system32\aelupsvc.dll,-1 is the DisplayName data for the Service Application Experience. In Win7 there is a location where these references are stored making it easy to get the correct DisplayName. But in Vista I did not find a place in the Registry where this information is stored. So I looked at the file being referenced and found that the File Description on the Details tab of the files properties would be sufficient.

So how can I get the File Description? I am using Java, so I prefer using Java or the Command Line top get this information.


回答1:


The version number is on the same page as the description.

so I guess this thread could be helpful:

Get Version Info for .exe




回答2:


Good job and good luck but I'd suggest you other, probably easier solution.

Use command line utility sc and/or WMI. You can connect to WMI by executing script (JScript or VBScript) using cscript utility directly from java program or using number of interoporability tools like JaWin, Jintegra or Jinterop.

JaWin and Jinterop are open source products.



来源:https://stackoverflow.com/questions/8052862/how-to-get-the-file-description-of-a-dll-or-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!