1.

Solve : command to check file version in batch file???

Answer»

Hi All,
COULD any one of you assist me in getting the dos command to check the version of the file installed?
Or the command to check file version in a BATCH file!!
Thanks in advance.

greetings,
Santhosh I'm not aware of any command EXCEPT for ver which will give you the version of your OS.

This script is will check file versions. (Note: all files do not contain version info)

Code: [SELECT]
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_Datafile Where name = 'c:\\windows\\system32\\rundll32.exe'")

For Each objFile in colFiles
Wscript.Echo "Version: " & objFile.Version
Next


Make sure your paths use \\ instead of \

Good luck.Thanks for your reply SIDEWINDER,
I was actually looking for a script to do it using only DOS or Batch file commands. However it would be useful.
I would appreciate more if there is a command in DOS or Batch file scripting..



Discussion

No Comment Found