Add Hide/Unhide command to right-click menu in Windows 7

You can manually set the hidden attribute of files and folders in Windows 7. But the process requires you to open file or folder properties, settings the hidden attributes and saving the changes. If you toggle the hidden attribute of files very often, then you might want to add the Hide/Unhide command to the right-click menu. Here is how :

Hide/Unhide right-click menu in Windows 7

Note : This procedure requires you to have administrator level access.

Manual method :

  1. First of all download the file win7_hide_unhide_menu.zip and save it to your desktop. Extract the contents of this file to your desktop and copy hide_unhide.cmd to your C: folder. You can copy it anywhere, but the path of this file should be same as used in step 8 below. We are choosing C: folder for simplicity.
  2. Press the key combination Windows logo key + R to open the Run dialog.
  3. In the Run Dialog, type regedit.exe and press Enter to open the Registry Editor.

    Open Registry Editor in Windows 7

  4. In the Registry Editor, navigate to the following key :
    HKEY_CLASSES_ROOT\*\shell
  5. Right-click on the key shell and select New → Key. Set hideunhide as the name of the newly created key.
  6. Double-click on the default value in the right side pane under this hideunhide key and change its value to Hide/Unhide.

    Adding Hide/Unhide right-click menu in Windows 7

  7. Right-click on the key hideunhide and select New → Key. Set command as the name of the newly created subkey.
  8. Double-click on the default value in the right side pane under this command subkey and change its value to C:\hide_unhide.cmd “%1”. Change the value according to where you copied the hide_unhide.cmd in step 1 above.

    Adding Hide/Unhide right-click menu in Windows 7

  9. That’s it. You have just added Hide/Unhide command to the right-click context menu in Windows Explorer. Now you can toggle the hidden attributes of files and folder with just one click.

Automatic method :

There is a way to complete all the above steps automatically. Download the file win7_hide_unhide_menu.zip and save it to your desktop. Extract its contents to a folder. Right-click on install.cmd and choose Run as administrator. This would automatically perform all the above steps. If later you want to remove the Hide/Unhide menu, then you can right-click on remove.cmd and choose Run as administrator.

Automatically adding Hide/Unhide right-click menu in Windows 7

If you hide a file or folder and it disappears from Windows Explorer, then you will have to check how to show hidden files and folders in Windows 7.