Easily Show / Hide Hidden Files and Folders in Windows XP, Vista and 7 0

тяσנαη нα¢кєя | 01:23 |





Easily Show / Hide Hidden Files and Folders in Windows XP, Vista and 7

In my previous post, I discussed how to generate a simple script to show/hide file extensions in Windows. In this post, I am going to discuss how to create a VB script to easily show/hide hidden files and folder in Windows without going to Tools > Folder Option > View > Show/Do not show hidden files and folders.

Just copy and paste the following script in notepad and save it as "ShowHiddenFilesOnOff.vbs" (including quotes).

Script:



Code:
Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden" SHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden" Set Sh = WScript.CreateObject("WScript.Shell") St = Sh.RegRead(Hidden) If St = 2 Then Sh.RegWrite Hidden, 1, "REG_DWORD" Sh.RegWrite SHidden, 1, "REG_DWORD" Else Sh.RegWrite Hidden, 2, "REG_DWORD" Sh.RegWrite SHidden, 0, "REG_DWORD" End If Sh.SendKeys("{F5}")
That's it! Now place it in some place in hard disk and create a shortcut in desktop or quick launch. The show/hide files and folder option will be toggled whenever you click on this shortcut.

Now if you want to create a context menu entry in folder, supposing you saved the script file in C:, create a reg file and save it as "ShowHiddenFilesOnOff.reg" without quote and merge it to registry.

Windows Vista and 7:

Code:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\Show / Hide Hidden Files] "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\Show / Hide Hidden Files\command] @="cmd.exe /c start C:\\ShowHiddenFilesOnOff.vbs"


Windows XP:


Code:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\Show / Hide Hidden Files] "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\shell\Show / Hide Hidden Files\command] @="cmd.exe /c start C:\\ShowHiddenFilesOnOff.vbs"
Modify the registry file if you saved the script file to any other location. To remove this entry from folder context menu just navigate to HKEY_CLASSES_ROOT\Directory\Background\Shell (in Vista and 7) or HKEY_CLASSES_ROOT\Directory\shell (in XP) and remove Show / Hide Hidden Files entry.

0 Responses So Far:

Facebook Blogger Plugin: Bloggerized by Abubaker Javed Enhanced by +92-301-5194008