Advertisement
anonymous1184

ahk-uninstall.cmd

Mar 9th, 2023 (edited)
1,783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. reg ADD HKLM /f >nul 2>&1 || (
  3.     echo This script needs to run elevated & exit /b
  4. )
  5. pushd "%tmp%"
  6. taskkill /F /IM "AutoHotkey*"
  7. curl -#LO "https://www.autohotkey.com/download/ahk-v2.exe"
  8. cd . > "ahk-v2.exe:Zone.Identifier"
  9. ahk-v2.exe /uninstall /silent
  10. del ahk-v2.exe
  11. del "C:\Windows\ShellNew\Template.ahk"
  12. rd /S /Q "C:\Program Files\AutoHotkey"
  13. certutil -delstore Root "AutoHotkey"
  14. reg DELETE "HKCR\AutoHotkeyScript\shell" /F
  15. reg DELETE "HKCU\Software\Microsoft\AutoHotkey" /F
  16. reg DELETE "HKCU\Software\Classes\AutoHotkeyScript" /F
  17. reg DELETE "HKLM\Software\Microsoft\AutoHotkey" /F
  18. reg DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AutoHotkey" /F
  19. pause
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement