How to write an autohotkey script to toggle the Show hidden files and folders setting?

Posted by Oq on Super User See other posts from Super User or by Oq
Published on 2010-03-11T06:09:35Z Indexed on 2011/01/03 9:56 UTC
Read the original article Hit count: 177

Filed under:
|

I would like to make use of a hotkey to toggle the Show hidden files and folders setting. I want to use it on both windowsXp and Windows7.

Here is what I got so far:

#h::
RegRead, Showall_Status, HKEY_LOCAL_MACHINE, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue, 
If Showall_Status = 0
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue, 1 
Else
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue, 0
Return

Problem is when I run the script it simply does nothing. Not sure what I am missing.

© Super User or respective owner

Related posts about autohotkey

Related posts about folder-options