Skip to content

Instantly share code, notes, and snippets.

@huyna
Last active June 17, 2022 17:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save huyna/2e56903bd0c51bfbd8cf to your computer and use it in GitHub Desktop.
Save huyna/2e56903bd0c51bfbd8cf 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment