Skip to content

Instantly share code, notes, and snippets.

@hex128
Last active July 30, 2016 17:33
Show Gist options
  • Save hex128/4c90d5ab71e2b7b96bcf to your computer and use it in GitHub Desktop.
Save hex128/4c90d5ab71e2b7b96bcf to your computer and use it in GitHub Desktop.
#NoEnv
#SingleInstance Force
#NoTrayIcon
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode RegEx
#IfWinActive ahk_class ExploreWClass|CabinetWClass|Progman
#h::
RegRead, current, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
If (current = 2) {
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 1
} Else {
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 0
}
Send {F5}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment