Batch file for version check of a specific application, installed on machine
Hi,
Can someone guide me, how do I write a batch file which will do a version check of a specific installed application?
Thanks
Answers (3)
Here is an example how you can pipe output of a vbscript check version to the batch command line:
Set wshshell = CreateObject("WScript.Shell")
Set filesys = CreateObject("Scripting.FileSystemObject")
on error resume next
if filesys.FileExists("c:\program files\Skype\Phone\Skype.exe") then FILEVERSION = filesys.GetFileVersion("c:\program files\Skype\Phone\Skype.exe")
if filesys.FileExists("c:\program files (x86)\Skype\Phone\Skype.exe") then FILEVERSION = filesys.GetFileVersion("c:\program files (x86)\Skype\Phone\Skype.exe")
if FILEVERSION = VERSION then
wscript.quit 0
else
wscript.quit 1626
end if