Script to Compare exe & dll files

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
tmp
New Member
Posts: 2
Joined: Mon Mar 27, 2006 3:06 pm

Script to Compare exe & dll files

Post by tmp »

To bad phpBB don't support attachments yet - but anyway it's not that much so I'll post it here:
Info.txt >>>
Compared PE-Files with examdiff with Totalcommander
===================================================

Button1
Description: Cmp All Exedata
Command: CmpExeall.bat
Parameters: %n %t%m

Button2
Description: Cmp Exedata (Header only)
Command: CmpExe.bat
Parameters: %n %t%m

Requirement:
* link.exe must be in the path
* Copy CmpExe*.bat to examdiff dir or edit CmpExeall.bat an make path to examdiff absolute

Get Visual C++ Toolkit 2003 from
http://www.microsoft.com/downloads/deta ... fa122fa91b
if you need 'link.exe'


Totalcommander download is here:
http://www.ghisler.com/download.htm
<<<

CmpExe.bat

Code: Select all

@prompt -$G
Rem /////////////////////////////////
Rem // CmpExe - Compares two PE-files
Rem // Usage:   CmpExe File1 File2 %options
Rem // Note:	'DUMPBIN.exe %1' is actually the same as
Rem //			'link.exe -dump %1'
Rem
cmpexeall.bat "%1" "%2" /rawdata:none
CmpExe.bat

Code: Select all

@prompt -$G
Rem //////////////////////////////////////////////////////////////////////
Rem // CmpExeAll - Compares two PE-files section data as hexdump included
Rem // Usage:   CmpExeAll File1 File2 %options
Rem // Note:	'DUMPBIN.exe %1' is actually the same as
Rem //			'link.exe -dump %1'
Rem

set file1=
set file2=

set file1="%temp%\%~n1%~x1_1"
set file2="%temp%\%~n2%~x2_2"

set DUMPBIN=link.exe -dump

%DUMPBIN% /all %3 "%~f1" >%file1%
%DUMPBIN% /all %3 "%~f2" >%file2%

"ExamDiff.exe" %file1% %file2%

del %file1%
del %file2%
AlexL
Expert Member
Posts: 129
Joined: Wed Aug 11, 2004 6:25 am
Location: Israel
Contact:

Re: Script to Compare exe & dll files

Post by AlexL »

tmp wrote:CmpExe.bat

Code: Select all

...
CmpExe.bat

Code: Select all

...
The 2-nd file is most probably "CmpExeAll.bat", and not "CmpExe.bat".
aban
New Member
Posts: 1
Joined: Wed Apr 18, 2007 10:04 pm

Post by aban »

great tops, Thanks,
this is called from command line, someone know how to call use vbscrip.
not .bat , and is .vbs

Thanks in adv.
Post Reply