Skip to content

Instantly share code, notes, and snippets.

@dadatuputi
Forked from trietptm/DisableASLR-win10.bat
Created January 9, 2021 21:24
Show Gist options
  • Save dadatuputi/59fa377f266a46f031e3d5c4a27158b5 to your computer and use it in GitHub Desktop.
Save dadatuputi/59fa377f266a46f031e3d5c4a27158b5 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 add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "MoveImages" /t REG_DWORD /d 0 /f
goto :EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment