Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare between two executable files?

I have a file which doesn't require UAC Warning. I copied the file to another location using C#.NET

 File.Copy("Original.exe", "Copy.exe");

Now i see that Copy.exe require UAC warning to run under windows 7/Vista.

How can i compare between Original.exe and Copy.exe to see exactly what happened to the file and change it manually so that it doesn't require UAC anymore. Which tool can i use to achieve that ?

enter image description here

BOTH EXECUTABLE ARE THE SAME FILE : How to know the difference between these two files ?

like image 748
Rafik Bari Avatar asked Jul 15 '12 22:07

Rafik Bari


People also ask

Does Windows have a file compare?

In computing, fc (File Compare) is a command-line program in DOS, IBM OS/2 and Microsoft Windows operating systems, that compares multiple files and outputs the differences between them.


1 Answers

Windows Installer Detection Technology is the reason of such behavior. There is a set of conditions which force executable file to be considered as requiring administrator privileges:

  1. 32 bit executables
  2. Applications without a requestedExecutionLevel
  3. Interactive processes running as a Standard User with LUA enabled

Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:

  • Filename includes keywords like "install," "setup," "update," etc.
  • Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
  • Keywords in the side-by-side manifest embedded in the executable.
  • Keywords in specific StringTable entries linked in the executable.
  • Key attributes in the RC data linked in the executable.
  • Targeted sequences of bytes within the executable.

Related MSDN article: http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx

Possible solutions:

  • If you are the author of executable, include manifest with specified requestedExecutionLevel
  • If you don't have access to source code - try to add or modify manifest using appropriate utilities (mt for example or maybe some generic resource editor)
  • Avoid keywords update, install and setup in executable file name
like image 62
max Avatar answered Sep 28 '22 18:09

max