Previously, a long time back; we wrote how you can manually show / hide file extension in Windows 7. This time we, will proceed further; we will add a toggle Show Hide file extension with a custom icon in Windows 7 right click context menu.
It will look like this:
Adding a Show Hide file extension in right click context menu is not much complicated than our few tutorials; still try to understand the things.
We are giving the example of the above screenshot like menu.
Creating the vbs file to to get the Show Hide file extension
One vbs file is needed.
Open Notepad. Write the following things:
FileExtension = “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvancedHideFileExt”
Set Command1 = WScript.CreateObject(“WScript.Shell”)
Set command2 = CreateObject(“Wscript.Shell”)
Check = Command1.RegRead(FileExtension)
If Check = 1 Then
Command1.RegWrite FileExtension, 0, “REG_DWORD”
Command1.RegWrite FileExtension, 1, “REG_DWORD”
Save the file asand do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Test it by double clicking it.
You can name it as you like; but you have to mention it later. Place it in your C partition (or where your Windows 7 is installed; if your Windows is not installed in C partition, change the drive letter to that in next step too).
Creating the registry file for getting Show Hide file extension in right click menu
This will add the functionality to get working from right click context menu. Open Notepad, copy paste the following and modify as per your need:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellToggle File Extensions]
[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellToggle File Extensionscommand]
[HKEY_CLASSES_ROOTDirectoryBackgroundshellToggle File Extensions]
[HKEY_CLASSES_ROOTDirectoryBackgroundshellToggle File Extensionscommand]
The orange text is the name that you want to see in the right click context menu.
Blue text is the path of any system icon. You can use your custom one or delete the lines if you do not need any icon.
The red text in the “Position”=”Bottom” defines where it will appear in the context menu, you can use Top,Middle instead of Bottom to show in different position as per your wish.
The green text is the path of the vbs file.
Save the file asand do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Name does not matter here at all. You can save as you like.
Now, double click the reg file and accept the security warnings and you will see the option named Toggle file extensions in right click context menu when clicked on a folder or any empty place inside folder or Windows 7 desktop.
You will get it as you want.
Removal of Show Hide file extension:
Add a minus sign before the H starts after the third bracket; liketo all where there is HKEY and save it (with some good name) as reg file and run it. It will break the association; so the option will disappear from right click context menu.
Obviously, you might delete the bat files manually too.
The rar file is password protected, type thecustomizewindows.com as the password.