I normally prefer to work with hidden and system files not visible, however very often there is a need to view such files. Normal way of enabling this via Widows Explorer (ALT + Tools > Folder Options > View) is way too many clicks for my liking.
Here is a simple vbscript which will toggle show hidden and system files option with a single click:
Dim isHiden, strHidden, strSystem
Dim WshShell
On Error Resume Next
strHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
strSystem = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SuperHidden"
Set WshShell = WScript.CreateObject("WScript.Shell")
isHiden = WshShell.RegRead(strHidden)
If isHiden = 2 Then 'currently hidden
WshShell.RegWrite strHidden, 1, "REG_DWORD"
WshShell.RegWrite strSystem, 1, "REG_DWORD"
WScript.Echo "Hidden and System file will be shown"
Else 'not currently hidden
WshShell.RegWrite strHidden, 2, "REG_DWORD"
WshShell.RegWrite strSystem, 0, "REG_DWORD"
WScript.Echo "Hidden and System file will NOT be shown"
End If
Download script from here.
Tested on Windows 7
Leave a Reply