none
Binary comparison utility for the executables RRS feed

  • Question

  • Hi All,

     

    Please help me if you have an idea on this. I am creating the same exe or dll from the same set of source code at different times. I did a binary comparison on these exe’s using Microsoft utilities like fc /b, windiff, and comp. I did a comparison using the third party comparison tool called Beyond comapare. But these systems are saying that the exe’s are different. Microsoft is saying that the date and time details are internally storing with the executables.  If anybody has an idea how can I get a comparison result by avoiding these date and time details using some tools running from the command prompt?

    Thanks,
    Bimal

    Tuesday, May 19, 2009 12:06 PM

Answers

  • Hi Bimal, this forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx.

    Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try "Visual C++ General Forum" at http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/threads instead to find the information you are looking for. Thanks!

    Regardless, I think I can be of some help. The time date stamp is stored in the VS_VERSION_INFO resource, which can be extracted with DumpBin.exe (a Visual Studio tool). I have Microsoft Visual Studio 2008 installed (on Windows Server 2008), and follow this procedure:

    Go to Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio Tools and select "Visual Studio 2008 Command Prompt".

    The command prompt that is opened has the necessary paths and environment variables set up so you can run DumpBin without error.

    Example:

    >dumpbin /headers %windir%\notepad.exe
    Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.

    Dump of file C:\Windows\notepad.exe

    PE signature found

    File Type: EXECUTABLE IMAGE

    FILE HEADER VALUES
                 14C machine (x86)
                   4 number of sections
            47918EA2 time date stamp Sat Jan 19 00:46:10 2008
                   0 file pointer to symbol table
                   0 number of symbols
                  E0 size of optional header
                 102 characteristics
                       Executable
                       32 bit word machine

    OPTIONAL HEADER VALUES
                 10B magic # (PE32)
                8.00 linker version
                9000 size of code
    .
    .
    .

    Regards,
    Bill Wesse


    Escalation Engineer
    Tuesday, May 19, 2009 1:11 PM