(as)  [sysadmin] [blog]

User Tools

Site Tools



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 /v.

We use 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.

LISTFILE is | (pipe) delimited. The syntax of LISTFILE is


1 file per line. Empty lines and lines starting with # are ignored.

If 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)"

If Comment is the single word required, mysigchk.bat will report if the file was not found. All other text in Comment is ignored and can be used for comments.

If 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.

Helper script

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 getversion.vbs in mysigchk.bat.

Previously, 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)


Command line

mysigchk.bat filestocheck.dat
mysigchk.bat filestocheck1.dat filestocheck2.dat
mysigchk.bat filestocheck*.dat

List of files

Example to read version numbers

~\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|
C:\Program Files\Mozilla Firefox\firefox.exe|
C:\Program Files\Mozilla Thunderbird\thunderbird.exe|

So, this could then be stored as a new LISTFILE, modified and checked again.

A larger example

C:\Program Files\putty\putty.exe||required
# Firefox and Thunderbird
~\Mozilla Firefox\firefox.exe|
~\Mozilla Thunderbird\thunderbird.exe|
# Adobe Acrobat 10
~\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe|
# Adobe Reader X/Adobe Reader 10
~\Adobe\Reader 10.0\Reader\AcroRd32.exe|
~\Adobe\Reader 10.0\Reader\AcroRd32.dll|
~\Adobe\Reader 10.0\Reader\plug_ins\EScript.api|
~\Adobe\Reader 10.0\Reader\plug_ins\Annots.api|
# Foxit Reader
~\pdfreader\Foxit Reader.exe|
~\Foxit Reader\Foxit Reader.exe|
~\Foxit Software\Foxit Reader\Foxit Reader.exe|
# Miscellaneous
# 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.



Andreas Schamanek, 2012-09-25 00:22

Ideally, the 2 scripts would be merged into 1 VBS script, I guess, but unfortunately, I never wrote VBS scripts. If anyone could give me some hints on how to convert the batch file to a VBS, I'd be happy to give it a try.

Michael Shvartsman, 2014-10-01 18:59, edited 2014-10-02 00:16

Hallo Andreas,

vielen Dank für Ihre Scripte. Sie sind für mich sehr hilfreich, um in Netzwerk Dateiversionen zu ermitteln. Leide in gemischte Landschaft (WIN XP und WIN7) muss man immer separat mit Einträgen im filestocheck.dat im Form z.B. \\PCxx\C$\Programme\Mozilla Firefox\firefox.exe bzw. \\PCxxxx\C$\Program Files (x86)\Mozilla Firefox\firefox.exe arbeiten weil Ihre ~ funktioniert nur "if 1st char of file (%%A) is ~ create a list of usual suspect paths". Was soll (darf) man genau im mysigchk.bat ändern, um "~ Funktion" an richtige Stelle zu nutzen (mit antworten in Form \\PCxxxx\……..\*.exe|xx.yy.zz

Freundliche Grüsse


Andreas Schamanek, 2014-10-02 00:21

@Michael: Ich hab es nie selbst mit UNC-Pfaden probiert. Aber wenn es grundsätzlich funktioniert, müsste man sie mit dem ~-Platzhalter verwenden können. Das heißt, Du erweiterst oder ersetzt die Liste in der Zeile

FOR %%P IN ("C:\\Program Files","C:\\Programme","C:\\Program Files (x86)") DO (


FOR %%P IN ("\\\PC01\\C$\\Programme","\\\PC02\\C$\\Programme","\\\PC03\\C$\\Programme") DO (

Dann sollte es funktionieren mit

~\\Mozilla Firefox\\firefox.exe|...usw
mysigchk_bat.txt · Last modified: 2020-10-12 21:24 by andreas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki