Jump to content

Shortcut to Show/Hide Hidden Files


Ehsan

Recommended Posts

This is how to create a shortcut that would enable or disable hidden files;

If the setting is enabled it would disable it when run, and vice versa;

It’s one shortcut that serves as an on/off switch for hidden files;

1_ Open up Notepad and paste in the following text:


Set sh = CreateObject("WScript.Shell")
theKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
setHidden = sh.RegRead(theKey)
If setHidden = 1 Then
setHidden = 0
MsgBox "System and hidden files will no longer appear in Explorer.",64,"Hidden File Exchange"
Else
setHidden = 1
MsgBox "System and hidden files will appear in Explorer.",64,"Hidden File Exchange"
End If
sh.RegWrite theKey,setHidden,"REG_DWORD"
Set sh = Nothing

2_ Save the file with any name you want, but make sure to designate the extension to be “.vbs”

3_ Run the file that you just saved. Give it a few seconds to take affect, but you should see the results without even having to restart Windows Explorer;

NOTE:

it only works on Vista/Seven when User Account Control (UAC) is disabled. This is because it needs access to the registry, and Vista/Seven doesn’t allow that unless it is run as an administrator.

Since it is a VBS file, the “Run as Administrator” option does not appear when right-clicking on the file!

Link to comment
Share on other sites


  • Views 1.6k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...