[win2kforum] Re: help

  • From: Greg Chapman <greg@xxxxxxxxxxxxx>
  • To: <win2kforum@xxxxxxxxxxxxx>
  • Date: Thu, 25 Mar 2004 08:44:31 -0600

I think you're correct BUT, there is a simple way to get the information
from a command prompt using Windows Script Host.

Create a new text file called GetFileVer.vbs and paste the following into
the file:

'===================================================
FileName=wscript.arguments(0)

Set fso=CreateObject("Scripting.FileSystemObject")
f=fso.GetFileVersion(FileName)

If Len(f) Then
  wscript.echo FileName & ", Version= " & f
Else
  wscript.echo "No version information available"
End If
'===================================================

Save the changes and close the file. Now, you can drag a file to this script
or you can issue a command similar to the following at the prompt:

Cscript <drive>:\<path>\GetFileVer.vbs "c:\winnt\system32\ddrawex.dll"

Using the above example, the result might look like:
c:\winnt\system32\ddrawex.dll, Version= 5.0.2134.1

In order to smooth operation a little, I suggest that you also set Cscript
to be the default Windows Script Host processor (this way all output goes
naturally to the command prompt):
CScript //H:cscript //NoLogo //S

Execution will then be as easy as:
<drive>:\<path>\GetFileVer.vbs "c:\winnt\system32\ddrawex.dll"

Hope that's of some assistance!

Greg Chapman
http://www.mousetrax.com


On 3/25/04 8:11 AM, "drew@xxxxxxxxxxxx" <drew@xxxxxxxxxxxx> wrote:

> I could be wrong, but I do not believe that is possible, at least with the
> default command line, without any 3rd party utilities.
> 
> Drew
> 
> Quoting madhu <madhuj4@xxxxxxxxxxx>:

-----

To unsubscribe, send a message to win2kforum-request@xxxxxxxxxxxxx and put 
"unsubscribe" in the subject of the message.
To reach the administrator(s), send a message to 
win2kforum-admins@xxxxxxxxxxxxxx

Other related posts: