PC Review


Reply
Thread Tools Rate Thread

Is file version info obtainable via batch

 
 
djc
Guest
Posts: n/a
 
      20th Apr 2004
using batch files is often cleaner and simpler than using VB with WSH. For a
task I am currently doing I need to programatically obtain the file version
of a dll file. In WSH this is done via the file system object's
GetFileVersion() method. This version is only on dll and other executibles.
For example is can be somthing like 1.08.234. Can I get this attribute from
the command prompt? If so my script could be much simpler.

thanks


 
Reply With Quote
 
 
 
 
Matthias Tacke
Guest
Posts: n/a
 
      20th Apr 2004
"djc" wrote:

>using batch files is often cleaner and simpler than using VB with WSH. For a
>task I am currently doing I need to programatically obtain the file version
>of a dll file. In WSH this is done via the file system object's
>GetFileVersion() method. This version is only on dll and other executibles.
>For example is can be somthing like 1.08.234. Can I get this attribute from
>the command prompt? If so my script could be much simpler.
>
>thanks
>

In the w2k reskit there is a filever.exe. You may download it here:
URL: http://www.dynawell.com/reskit/micro...00/filever.zip

Sample output on itself once complete and once filtered to the version:

==screen-copy=========================================================
C:\test>filever x:filever.exe /B
--a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999 x:\filever.exe

C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do @echo/%A
5.0.2134.1

C:\test>
==screen-copy=========================================================

HTH

--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
 
Reply With Quote
 
 
 
 
djc
Guest
Posts: n/a
 
      21st Apr 2004
I like. Thanks!

"Matthias Tacke" <(E-Mail Removed)> wrote in message
news:c644cs$gmf$07$(E-Mail Removed)...
> "djc" wrote:
>
> >using batch files is often cleaner and simpler than using VB with WSH.

For a
> >task I am currently doing I need to programatically obtain the file

version
> >of a dll file. In WSH this is done via the file system object's
> >GetFileVersion() method. This version is only on dll and other

executibles.
> >For example is can be somthing like 1.08.234. Can I get this attribute

from
> >the command prompt? If so my script could be much simpler.
> >
> >thanks
> >

> In the w2k reskit there is a filever.exe. You may download it here:
> URL: http://www.dynawell.com/reskit/micro...00/filever.zip
>
> Sample output on itself once complete and once filtered to the version:
>
> ==screen-copy=========================================================
> C:\test>filever x:filever.exe /B
> --a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999

x:\filever.exe
>
> C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do @echo/%A
> 5.0.2134.1
>
> C:\test>
> ==screen-copy=========================================================
>
> HTH
>
> --
> Greetings
> Matthias________________________________________
> For help on nt commands enter in a cmd window:
> W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm



 
Reply With Quote
 
Al Dunbar [MS-MVP]
Guest
Posts: n/a
 
      21st Apr 2004

"djc" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I like. Thanks!
>
> "Matthias Tacke" <(E-Mail Removed)> wrote in message
> news:c644cs$gmf$07$(E-Mail Removed)...
> > "djc" wrote:
> >
> > >using batch files is often cleaner and simpler than using VB with WSH.


Just to pick a nit, that is not "VB" you are using with WSH, but "VBScript"
or "VBS".

/Al


> For a
> > >task I am currently doing I need to programatically obtain the file

> version
> > >of a dll file. In WSH this is done via the file system object's
> > >GetFileVersion() method. This version is only on dll and other

> executibles.
> > >For example is can be somthing like 1.08.234. Can I get this attribute

> from
> > >the command prompt? If so my script could be much simpler.
> > >
> > >thanks
> > >

> > In the w2k reskit there is a filever.exe. You may download it here:
> > URL: http://www.dynawell.com/reskit/micro...00/filever.zip
> >
> > Sample output on itself once complete and once filtered to the version:
> >
> > ==screen-copy=========================================================
> > C:\test>filever x:filever.exe /B
> > --a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999

> x:\filever.exe
> >
> > C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do @echo/%A
> > 5.0.2134.1
> >
> > C:\test>
> > ==screen-copy=========================================================
> >
> > HTH
> >
> > --
> > Greetings
> > Matthias________________________________________
> > For help on nt commands enter in a cmd window:
> > W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm

>
>



 
Reply With Quote
 
djc
Guest
Posts: n/a
 
      21st Apr 2004
yep, I'm aware of that and assumed most here would know that as well. I'll
be more specific in the future.
thanks.


"Al Dunbar [MS-MVP]" <alan-no-drub-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "djc" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I like. Thanks!
> >
> > "Matthias Tacke" <(E-Mail Removed)> wrote in message
> > news:c644cs$gmf$07$(E-Mail Removed)...
> > > "djc" wrote:
> > >
> > > >using batch files is often cleaner and simpler than using VB with

WSH.
>
> Just to pick a nit, that is not "VB" you are using with WSH, but

"VBScript"
> or "VBS".
>
> /Al
>
>
> > For a
> > > >task I am currently doing I need to programatically obtain the file

> > version
> > > >of a dll file. In WSH this is done via the file system object's
> > > >GetFileVersion() method. This version is only on dll and other

> > executibles.
> > > >For example is can be somthing like 1.08.234. Can I get this

attribute
> > from
> > > >the command prompt? If so my script could be much simpler.
> > > >
> > > >thanks
> > > >
> > > In the w2k reskit there is a filever.exe. You may download it here:
> > > URL: http://www.dynawell.com/reskit/micro...00/filever.zip
> > >
> > > Sample output on itself once complete and once filtered to the

version:
> > >
> > > ==screen-copy=========================================================
> > > C:\test>filever x:filever.exe /B
> > > --a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999

> > x:\filever.exe
> > >
> > > C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do @echo/%A
> > > 5.0.2134.1
> > >
> > > C:\test>
> > > ==screen-copy=========================================================
> > >
> > > HTH
> > >
> > > --
> > > Greetings
> > > Matthias________________________________________
> > > For help on nt commands enter in a cmd window:
> > > W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm

> >
> >

>
>



 
Reply With Quote
 
Al Dunbar [MS-MVP]
Guest
Posts: n/a
 
      21st Apr 2004

"djc" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> yep, I'm aware of that and assumed most here would know that as well. I'll
> be more specific in the future.
> thanks.


The regulars certainly know. But we get a lot of first-timers here looking
for solutions, and we don't want to confuse them about such details.

/Al


>
>
> "Al Dunbar [MS-MVP]" <alan-no-drub-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > "djc" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I like. Thanks!
> > >
> > > "Matthias Tacke" <(E-Mail Removed)> wrote in message
> > > news:c644cs$gmf$07$(E-Mail Removed)...
> > > > "djc" wrote:
> > > >
> > > > >using batch files is often cleaner and simpler than using VB with

> WSH.
> >
> > Just to pick a nit, that is not "VB" you are using with WSH, but

> "VBScript"
> > or "VBS".
> >
> > /Al
> >
> >
> > > For a
> > > > >task I am currently doing I need to programatically obtain the file
> > > version
> > > > >of a dll file. In WSH this is done via the file system object's
> > > > >GetFileVersion() method. This version is only on dll and other
> > > executibles.
> > > > >For example is can be somthing like 1.08.234. Can I get this

> attribute
> > > from
> > > > >the command prompt? If so my script could be much simpler.
> > > > >
> > > > >thanks
> > > > >
> > > > In the w2k reskit there is a filever.exe. You may download it here:
> > > > URL: http://www.dynawell.com/reskit/micro...00/filever.zip
> > > >
> > > > Sample output on itself once complete and once filtered to the

> version:
> > > >
> > > >

==screen-copy=========================================================
> > > > C:\test>filever x:filever.exe /B
> > > > --a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999
> > > x:\filever.exe
> > > >
> > > > C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do

@echo/%A
> > > > 5.0.2134.1
> > > >
> > > > C:\test>
> > > >

==screen-copy=========================================================
> > > >
> > > > HTH
> > > >
> > > > --
> > > > Greetings
> > > > Matthias________________________________________
> > > > For help on nt commands enter in a cmd window:
> > > > W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
djc
Guest
Posts: n/a
 
      22nd Apr 2004
do you know if this version of filever would work under nt4 as well? and XP?
I support a mix of NT4/2K/XP workstations so I tend to stay away from
anything unless it works on all 3. If you know let me know. I'll just try it
if I don't here from you.

thanks agian.



"Matthias Tacke" <(E-Mail Removed)> wrote in message
news:c644cs$gmf$07$(E-Mail Removed)...
> "djc" wrote:
>
> >using batch files is often cleaner and simpler than using VB with WSH.

For a
> >task I am currently doing I need to programatically obtain the file

version
> >of a dll file. In WSH this is done via the file system object's
> >GetFileVersion() method. This version is only on dll and other

executibles.
> >For example is can be somthing like 1.08.234. Can I get this attribute

from
> >the command prompt? If so my script could be much simpler.
> >
> >thanks
> >

> In the w2k reskit there is a filever.exe. You may download it here:
> URL: http://www.dynawell.com/reskit/micro...00/filever.zip
>
> Sample output on itself once complete and once filtered to the version:
>
> ==screen-copy=========================================================
> C:\test>filever x:filever.exe /B
> --a-- W32i APP ENU 5.0.2134.1 shp 13,584 11-30-1999

x:\filever.exe
>
> C:\test>for /F "tokens=5" %A in ('filever x:filever.exe') do @echo/%A
> 5.0.2134.1
>
> C:\test>
> ==screen-copy=========================================================
>
> HTH
>
> --
> Greetings
> Matthias________________________________________
> For help on nt commands enter in a cmd window:
> W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm



 
Reply With Quote
 
Matthias Tacke
Guest
Posts: n/a
 
      22nd Apr 2004
"djc" wrote:

>do you know if this version of filever would work under nt4 as well? and XP?
>I support a mix of NT4/2K/XP workstations so I tend to stay away from
>anything unless it works on all 3. If you know let me know. I'll just try it
>if I don't here from you.
>
>thanks agian.
>


XP is no problem and nt4 should works also, but testing would take more
time.

HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
 
Reply With Quote
 
Bill Stewart
Guest
Posts: n/a
 
      22nd Apr 2004
djc <(E-Mail Removed)> wrote:

> using batch files is often cleaner and simpler than using VB with WSH.
> For a task I am currently doing I need to programatically obtain the file
> version of a dll file. In WSH this is done via the file system object's
> GetFileVersion() method. This version is only on dll and other
> executibles. For example is can be somthing like 1.08.234. Can I get this
> attribute from the command prompt? If so my script could be much simpler.


Hi djc,

I also wrote a freeware program called fver.exe that lets you check a
file's version in ERRORLEVEL from a batch file.

http://home.comcast.net/~stewartb/wast.html

HTH,

Bill


 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      22nd Apr 2004
In microsoft.public.win2000.cmdprompt.admin Bill Stewart wrote:

> djc <(E-Mail Removed)> wrote:
>
>> using batch files is often cleaner and simpler than using VB with
>> WSH. For a task I am currently doing I need to programatically
>> obtain the file version of a dll file. In WSH this is done via
>> the file system object's GetFileVersion() method. This version is
>> only on dll and other executibles. For example is can be somthing
>> like 1.08.234. Can I get this attribute from the command prompt?
>> If so my script could be much simpler.

>
> Hi djc,
>
> I also wrote a freeware program called fver.exe that lets you
> check a file's version in ERRORLEVEL from a batch file.
>
> http://home.comcast.net/~stewartb/wast.html


FVER is very handy. Use it a lot. (pesky "-" switch character
though <GDAR>)

If you are at Bill's site check out all the "WAST", "BST" et al.
stuff.


OP may also want to look at verinfo.exe
http://www.angelfire.com/va3/winmem/verinfo.html

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Windows XP General 11 9th Feb 2008 02:55 AM
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Microsoft Dot NET 11 9th Feb 2008 02:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] Windows XP Help 0 5th Feb 2008 04:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Windows XP Help 0 5th Feb 2008 03:45 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Microsoft ASP .NET 0 5th Feb 2008 03:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:34 PM.