The AARD code was a segment of code in a beta release of Microsoft Windows 3.1 that would determine whether Windows was running on MS-DOS or PC DOS, rather than a competing workalike such as DR-DOS, and would result in a cryptic error message in the latter case. This XOR-encrypted, self-modifying, and deliberately obfuscated machine code used a variety of undocumented DOS structures and functions to perform its work. The code was present in the installer, in WIN.COM, and in several other executables in the operating system.
The AARD code was originally discovered by Geoff Chappell on 17 April 1992 and then further analyzed and documented in a joint effort with Andrew Schulman. The name was derived from Microsoft programmer Aaron R. Reynolds (1955–2008), who used "AARD" to sign his work; "AARD" was found in the machine code of the installer. Microsoft disabled the AARD code for the final release of Windows 3.1, but did not remove it, so that it could have become reactivated later by the change of a single byte in an installed system.
DR-DOS publisher Digital Research released a patch named "business update" in 1992 to enable the AARD tests to pass on its operating system.
The rationale for the AARD code came to light when internal memos were released during the United States v. Microsoft Corp. antitrust case in 1999. Internal memos released by Microsoft revealed that the specific focus of these tests was DR-DOS. At one point, Microsoft CEO Bill Gates sent a memo to a number of employees, reading "You never sent me a response on the question of what things an app would do that would make it run with MS-DOS and not run with DR-DOS. Is there feature they have that might get in our way?" Microsoft Senior Vice President Brad Silverberg later sent another memo, stating: "What the [user] is supposed to do is feel uncomfortable, and when he has bugs, suspect that the problem is DR-DOS and then go out to buy MS-DOS."
Following the purchase of DR-DOS by Novell and its renaming to "Novell DOS", Microsoft Co-President Jim Allchin stated in a memo, "If you're going to kill someone there isn't much reason to get all worked up about it and angry. Any discussions beforehand are a waste of time. We need to smile at Novell while we pull the trigger."
Novell DOS changed hands again. The new owner, Caldera, Inc., began a lawsuit against Microsoft over the AARD code, Caldera v. Microsoft, which was later settled. It was originally believed that the settlement was around $150 million, but in November 2009 the Settlement Agreement was released, and the total was revealed to be $280 million.