npaun
asked on
How to programmatically get an exe file description?
How to programmatically get an exe file description? For instance, for "C:\Program Files (x86)\Internet Explorer\iexplore.exe", and for it, you would get "Internet Explorer" if you right click on the file, and look in the Properties>General for the Description label...
But how to do it programmatically, from your own program (VB6), having the exe file path? I suppose, an API function should do the job, but I can't find which one and an example for it...
But how to do it programmatically, from your own program (VB6), having the exe file path? I suppose, an API function should do the job, but I can't find which one and an example for it...
I think what you are after is the FileInfo class eg
https://msdn.microsoft.com/en-us/library/system.io.fileinfo_members(v=vs.90).aspx
Dim information As System.IO.FileInfo
information = My.Computer.FileSystem.GetFileInfo("C:\MyLogFile.log")
https://msdn.microsoft.com/en-us/library/system.io.fileinfo_members(v=vs.90).aspx
That's .Net code and the Asker is talking about VB6.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
PS: The approach I've found seems not to work on XP though...
However, this one seems to work on XP: https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4976&lngWId=1
However, this one seems to work on XP: https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4976&lngWId=1
ASKER
I've found an exact solution from other sources...
If you can describe why you need the description then maybe there's another way to do it.