How do you disable ASLR (address space layout randomization) on Windows 7 x64?

Previously you had to opt in to allowing the linker to use ASLR. Now, you have to opt out:

/DYNAMICBASE[:NO]

(Visual Studio 2012: Configuration Properties -> Linker -> Advanced -> "Randomized Base Address")

You can also do it programmatically.


A registry setting is available to forcibly enable or disable ASLR for all executables and libraries and is found at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages.


The Enhanced Mitigation Experience Toolkit (EMET), downloadable from Microsoft, allows to enable/disable ASLR it on a system or process basis.