Abstract: The present invention, generally speaking, provides a method for modifying an original executable by injecting it with an injection executable, using a code injection utility. The original executable and the injection executable are of the same or compatible file formats, and the structure of both executables is either known in advance or ascertainable, i.e., by “dumping” and analyzing the contents of the executable. Preferably, the injection executable is a complete, self-contained executable written using standard development tools, such as a graphical, object-oriented development environment. In an exemplary embodiment, the code injection utility combines the original executable and the injection executable in such a way as to control execution of the original executable through prior execution of the injection executable.
Abstract: The present invention, generally speaking, provides a mechanism for modifying an executable upon first execution. Various modifications may be made to the executable, including modifications useful for purposes of electronic software distribution, such as attaching a unique serial number, encrypting or decrypting the executable, or adding protection code (license enforcement code) to the executable. A Rewriter Module performs the actual modification. First, a copy of the executable is made. The copy is then run and the original executable is deleted. Then a second copy of the executable is made using the name of the original executable, and the first copy is deleted. During one or both of the copying steps, modifications are made to the executable. The modifications may be modifications useful for purposes of electronic software distribution, especially Try/Buy. When a software product is purchased, the foregoing process may be reversed, leaving the executable in its original "pristine" condition.