A Windows Batch file to check the version of executables (program files, DLL files, …) by processing lists of files and reference version numbers.
mysigchk.bat [/v] LISTFILE [LISTFILE ...]
mysigchk.bat reads file names including paths and version numbers from LISTFILE. It then retrieves the version of the files and reports files with non-matching numbers. Non-existing files are ignored unless
mysigchk.bat is started with
mysigchk.bat to scan computers for old outdated applications or missing installations. There's a number of applications out there for this task but generally they are rather bloated, come with a number of dependencies and are hard to automate.
mysigchk.bat follows the KISS principle. However, it checks only files that we want it to check, and we have to update the version numbers manually. Eventually, the later can be an advantage in cases where one deliberately wants to keep an older version of a program.
| (pipe) delimited. The syntax of LISTFILE is
1 file per line. Empty lines and lines starting with
# are ignored.
Path starts with
~ will be substituted with a fixed list of directories commonly used for program files. This list is hard coded (but can be easily spotted in the script). The list currently is:
C:\Programs,"C:\Program Files",C:\Programme,"C:\Program Files (x86)"
Comment is the single word
mysigchk.bat will report if the file was not found. All other text in
Comment is ignored and can be used for comments.
Version is empty
mysigchk.bat will report the version number using the syntax of LISTFILE. So, a LISTFILE with no
Version numbers can be used to create a file with the current status of version numbers.
The script uses a helper script
getversion.vbs to retrieve the version number of the files (download below). In order for
mysigchk.bat to work, just download both scripts into the same folder. Otherwise, one needs to change the path to
mysigchk.bat was a wrapper around Sysinternals' sigcheck. Later, we found that a simple VBS script works as well, in fact, it's even faster. The old version of
mysigchk.bat is still available though: mysigch1.bat (1 KB, last update 2012-09-21)
mysigchk.bat filestocheck.dat mysigchk.bat filestocheck1.dat filestocheck2.dat mysigchk.bat filestocheck*.dat
~\putty\putty.exe ~\Mozilla Firefox\firefox.exe ~\Mozilla Thunderbird\thunderbird.exe
If you have these programs installed in their default directories running
mysigchk.bat initial.dat should return something like
C:\Program Files\putty\putty.exe|0.62.0.0 C:\Program Files\Mozilla Firefox\firefox.exe|22.214.171.12431 C:\Program Files\Mozilla Thunderbird\thunderbird.exe|126.96.36.19933
So, this could then be stored as a new LISTFILE, modified and checked again.
~\putty\putty.exe|0.62.0.0 C:\Program Files\putty\putty.exe|0.62.0.0|required # Firefox and Thunderbird ~\firefox\firefox.exe|188.8.131.5231 ~\Mozilla Firefox\firefox.exe|184.108.40.20631 ~\thunderbird\thunderbird.exe|220.127.116.1133 ~\Mozilla Thunderbird\thunderbird.exe|18.104.22.16833 # Adobe Acrobat 10 ~\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe|10.1.4.38 # Adobe Reader X/Adobe Reader 10 ~\Adobe\Reader 10.0\Reader\AcroRd32.exe|10.1.4.38 ~\Adobe\Reader 10.0\Reader\AcroRd32.dll|10.1.4.38 ~\Adobe\Reader 10.0\Reader\plug_ins\EScript.api|10.1.4.38 ~\Adobe\Reader 10.0\Reader\plug_ins\Annots.api|10.1.4.38 # Foxit Reader ~\pdfreader\Foxit Reader.exe|22.214.171.1241 ~\Foxit Reader\Foxit Reader.exe|126.96.36.1991 ~\Foxit Software\Foxit Reader\Foxit Reader.exe|188.8.131.521 # Miscellaneous ~\irfanview\i_view32.exe|4.33 ~\totalcmd\totalcmd.exe|184.108.40.206 ~\vlc\vlc.exe|220.127.116.11 ~\VideoLAN\vlc.exe|18.104.22.168 ~\VideoLAN\VLC\vlc.exe|22.214.171.124 ~\winamp\winamp.exe|126.96.36.19934 ~\winscp\winscp.exe|188.8.131.527 ~\winscp3\winscp.exe|184.108.40.2067 ~\SumatraPDF\SumatraPDF.exe|220.127.116.11.0 # Microsoft ~\Microsoft Security Client\MsMpEng.exe|4.0.1526.0
2009-12-01 First usable version, provided to colleagues 2012-09-03 Added placeholder ~ (tilde) to look for files in common dirs 2012-09-21 Updated script and made it publicly available 2012-09-24 Replaced sigcheck.exe with getversion.vbs
I have tested this only on some Windows XP, and Windows 7 installations. It's my first attempt at using batch file extensions, delayed expansion and variable modifiers. Use at your own risk.
This script is free software. Use it as you please. It comes without any warranties, though.