b-man Posted November 9, 2010 Share Posted November 9, 2010 (edited) i found this on another forum for toggling hidden filescan someone change it to toggle file extensions and is it possible to add a checkmark when its enabled (showing file extensions)This works OK on my 64-bit Home Premium System. It adds the option to your context or "right-click" menu.It consists of a .vbs file and a .reg file. I can't remember where I found it though ('twas last Chrimble!)so I'm copying the "codes" here.Open a New Text Document.txt and copy this code into it.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 ThenSh.RegWrite Hidden, 1, "REG_DWORD"Sh.RegWrite SHidden, 1, "REG_DWORD"ElseSh.RegWrite Hidden, 2, "REG_DWORD"Sh.RegWrite SHidden, 0, "REG_DWORD"End IfSh.SendKeys("{F5}")Save it using "Save As..." as Show_Hidden_Files_Switch.vbs (or just save the New Text Document.txt, when saved just re-name it, including extension). Place it in your C:\Windows Folder.Then make a .reg file using the same method with this 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:\\Windows\\Show_Hidden_Files_Switch.vbs"Save it as Whatever_You_Want.reg. Then just (Run) Merge the .reg file into the registry and you're good to go. It will "instantly" be in your context menu. No re-boot required.If you later change your mind and want it off your context menu, make a reg file with this code.Windows Registry Editor Version 5.00[-HKEY_CLASSES_ROOT\Directory\Background\shell\Show / Hide Hidden Files]Run it and the context menu entry will be gone.HTH. Edited November 13, 2010 by b-man Link to comment Share on other sites More sharing options...
b-man Posted November 13, 2010 Author Share Posted November 13, 2010 (edited) ok for ppl that want to know how to do it i have worked it out - works with my win 7 64bit but dont see why it wouldnt work with any version of xp/ vista or win 7 with my knowledge of scripting (none) and registry (amature) heres my script and reg fileshas a checkmark when file extensions are showing and changes between (show file extensions) and (hide file extensions) in right click menuscriptopen notepad place the script code and save as FileExtToggle.vbs location- place in c:\Windows\Bman\FileExtToggle\Hide = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"Set Sh = WScript.CreateObject("WScript.Shell")St = Sh.RegRead(Hide)sRegFile1 = "C:\Windows\Bman\FileExtToggle\Hide.reg"sRegFile2 = "C:\Windows\Bman\FileExtToggle\Show.reg"If St = 0 ThenSh.RegWrite Hide, 1, "REG_DWORD"sh.Run "regedit.exe /s " & Chr(34) & sRegFile1 & Chr(34), 0, TrueElseSh.RegWrite Hide, 0, "REG_DWORD"sh.Run "regedit.exe /s " & Chr(34) & sRegFile2 & Chr(34), 0, TrueEnd IfSh.SendKeys("{F5}")Hide.reg (open notepad paste and save as Hide.reg) location- place in c:\Windows\Bman\FileExtToggle\Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Background\shell\Show File Extension][HKEY_CLASSES_ROOT\Directory\Background\shell\Show File Extension\command]@="cmd.exe /c start C:\\Windows\\Bman\\FileExtToggle\\FileExtToggle.vbs"[-HKEY_CLASSES_ROOT\Directory\Background\shell\Hide File Extension]"Icon"="C:\\Windows\\Bman\\Icons\\Context Menu\\checkmark.ico"[-HKEY_CLASSES_ROOT\Directory\Background\shell\Hide File Extension\command]@="cmd.exe /c start C:\\Windows\\Bman\\FileExtToggle\\FileExtToggle.vbs"Show.reg (open notepad paste and save as Show.reg) location- place in c:\Windows\Bman\FileExtToggle\Windows Registry Editor Version 5.00[-HKEY_CLASSES_ROOT\Directory\Background\shell\Show File Extension][-HKEY_CLASSES_ROOT\Directory\Background\shell\Show File Extension\command]@="cmd.exe /c start C:\\Windows\\Bman\\FileExtToggle\\FileExtToggle.vbs"[HKEY_CLASSES_ROOT\Directory\Background\shell\Hide File Extension]"Icon"="C:\\Windows\\Bman\\Icons\\Context Menu\\checkmark.ico"[HKEY_CLASSES_ROOT\Directory\Background\shell\Hide File Extension\command]@="cmd.exe /c start C:\\Windows\\Bman\\FileExtToggle\\FileExtToggle.vbs"checkmarkgoogle a checkmark icon u want, convert to ico file by http://www.coolutils.com/online/image-converter/save in C:\Windows\Bman\Icons\Context Menu\checkmark.icoand your doneexecute vbs file once to give u the menu in right click Edited November 13, 2010 by b-man Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now