Skip to content

Instantly share code, notes, and snippets.

@trietptm
Forked from huyna/DisableASLR-win10.bat
Created March 28, 2016 19:21
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save trietptm/b84ccad9db01f459ac7e to your computer and use it in GitHub Desktop.
Save trietptm/b84ccad9db01f459ac7e to your computer and use it in GitHub Desktop.
@ECHO OFF
SETLOCAL
ECHO ASLR Enable / Diable Batch Script - Please run as admin
set /p Choice=Want to Enable or Disable ASLR? (e or d):%=%
if "%Choice%"=="e" goto :ENABLE
if "%Choice%"=="d" goto :DISABLE
:ENABLE
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "MoveImages" /t REG_DWORD /d 1 /f
goto :EOF
:DISABLE
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "MoveImages"
goto :EOF
@chaoscreater
Copy link

On Win10 and WIn11, you can disable ASLR by adjusting the settings in Windows Defender. See here for screenshots:
https://gfs-gamerfullstop.online/how-to-fix-windows-11-settings-menu-not-opening/

@he852100
Copy link

he852100 commented May 2, 2023

It is invalid, and Windows 11 cannot disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment